On the one hand (so to speak)…
The hand of another person could be stimulating you, the nerve endings reacting to the friction, and if it were in the dark in a writhing mass of people, you might not even know the sex of the person operating it. We all have the capacity, under some circumstance, to have erotic experiences with persons of the same sex, the opposite sex, and perhaps sexes yet to be discovered.
And as a consequence of that, then yes, people being what they are, it is possible for a person to choose on the basis of social politics to experience their orgasms with one sex or the other. Joanna Russ, a feminist / science-fiction author who wrote quite a bit in the 70s, was rather explicit on this point:
(from The Female Man)
Does the person making such a social-politically-based decision “truly become lesbian” (or gay, or straight, or whatever), though? Or, to unpack some of our modern cultural sexual assumptions back out of that suitcase, let’s ask: Does such a person still lust for a sex other than the one they’ve chosen to restrict their erotic encounters to? And does such a person enjoy sex less if they have chosen to pursue erotic encounters with a sex to which they are not natively & directly sexually attracted?
Joanna Russ, in the quoted excerpts above, is easy to read as a strong “yes” on the first part, but an unclear response on the second. “Less” than what? Less than they would enjoy a sexual liaison with the sex to which they are more viscerally attracted under ideal conditions, conditions where the social-political reasons for their choice would not apply? Or less than the extent to which they can actually experience enjoyable sex with people of that sex, with all the social baggage and mental baggage and political and historical baggage that comes with it?
If you tend to have a lot of orgasms in a green room with Bach playing, you might begin to have Pavlovian erogenous responses to being in a green room with Bach playing; so by the same logic, perhaps if you have orgasms sufficiently often with a sex you were not originally attracted to, you could start to have an erogenous response to the presence of that sex “as a situation”, even if you were no more indigenously attracted to that than you are to green rooms or the sound of Bach.