May have been in a SF magazine about 25 years ago. I remember it having a complex society and it was punishable by law if one creature rams into two others causing a pregnancy.
I think you may be refering to one of the books (probably the first) in Pier's Anthony's 'Cluster' series. There was at least one underwater race (they show up in several books) that had three genders. If all three got close enough together, mating would occur involuntarily, and involved them overlapping as part of it.
The order they came together determined what role each ended up taking, and it was a crime to initiate it without consent of the parties involved.
The stories are actually kind of interesting, but at many times devolve into an excuse to describe alien sex.
Stealing from an article on Strange Horizons:
Anthony breaks away from these models and creates a three-sex system that includes, rather than men and women, Impacts, Sibilants, and Undulants.
As an Impact member of this oceanic race, Flint swims along, proceeding on his mission, and accidentally crosses a boundary zone designed to keep the three sexes from intermingling. The reason for this soon becomes clear. For this species, sex is not a voluntary act. The presence of all three sexes causes an overpowering biological urge that culminates in sex. "It was sex -- with three sexes . . . [t]he three entities were penetrating each other -- but not as a man penetrated a woman. Not even as a two-man/one-woman trio. They were interpenetrating."
Even more alien is Flint's discovery that for this species, the sexual act automatically results in reproduction. The actual gender roles played by each sex vary depending on the circumstances. Whoever initiates the sexual act (in this case, Flint) becomes the catalyst. The other two become the sire and the parent, the latter of which actually creates the offspring. (Anthony never makes it clear how the remaining two participants become parent or sire.) As a result, someone who was a parent could easily become a catalyst in another union. As befitting the watery environment, gender identity is truly fluid. Sex only serves to create three possible roles, not to assign an individual irrevocably to any one of those roles.
This sounds a lot like The Gods Themselves by Isaac Asimov, although I don't remember them as being sea creatures, or the bit about the law against what sounds like rape.