"The law is that inside the 3 mile limit your Y valve must be SECURED in the closed position to prevent overboard discharge."
That one I never heard of, and I have checked this year's federal boating handbook. Secured in a NDZ, yes. But the 3-mile limit is a MARPOL discahrge zone, not a sewage discharge zone, AFAIK
How a boarding party will treat you for not having a discharge "secured" is pretty much up to the boarding officer, if you impress them as generally responsible and shipshape, they're more likely to just point and grumble, like cops everywhere.
Pissing overboard is legal because there is no shipboard sanitation system involved. Piss in a bicket and then dump the bucket overboard--and now you've got an "equipment" discharge and potential legal problems. Yes, the law really is that way.
If space is really tight you may want to look into adding a urinal in the head, which often can legally drain overboard, no storage required. Or, at least, minimal space in the holding tank if you just do a gravity flush or manual flush (throw a cup of water in) after use. You won't see this on the Disney Channel but men HAVE been known to pee in the sink, both on land and at sea, when other facilities are not convenient. Before the advent of separate bathrooms for every room (in boarding houses too) this was not uncommon.
Of course gentlemen will rinse the sink afterwards. Ahem.