Please, do read. USN prohibited numerous types of fraternization outright. Relationships that appear to compromise the operation of the department are prohibited, even though the two might be of similar stature (NCO to NCO or senior officer to senior officer). The fact that Seven, as CO, would be required to file reports on inappropriate relationships might be considered a red flag in and of itself.
The matter could be different depending on context. Two junior officers who served in different departments, say a nurse and a pilot, might be tolerated, but it could still be subject to scrutiny. A married couple can apply to be co-located in order to have a house, but they would still be only on a base, not in the same department, and subject to approval. Once they divorce, no guarantees, even if they are parents. Unmarried couples have no such rights.
Married couples are assigned to the same ship. Since 1987 Trek has wanted to bring families into the picture. There have been numerous debates of the wisdom of this, both on the show and amongst fans. Obviously, some charitable interpretation of real world experience is necessary. However, I think it is not trivial that these relationships don't last (Lessons), are mostly offscreen (Rikers on Titan), or run afoul of the operations (Change of Heart). That's why, trying to be charitable and not wanting episode after episode of differences of opinion turning into lovers quarrels, I suggested showing some other way of positioning Raffi.