In principle this would constitute sexual harassment and should be verboten. In practice I can see the complaining straight getting drummed out of the service.
All they would have to do is pull their little tricks when no one else is there to see it. It would be your word against theirs. And spreading “false rumors” would merit captain’s mast.
Of course, there would be homos acting on their sexual urges all over the ship: paint lockers, generator rooms, mail rooms—anywhere they could hide their activities undetected. And when a straight sailor discovers their activities, that might be a dangerous situation. One bump and you go over the side; never to reveal what you discovered.