Hi,
the European Union does not exist, it is a
marketing product.
For sailing, each country has its own laws all different and contrasting.
For the French you can take a sailboat without a
license, so a Frenchman can go anywhere....
the Italians have a lot of licenses to get with a vexatious and expensive bureaucracy, so to sail where the French travel "only with his boat" , the Italian has a thousand documents and permits on board.
Everyone brings their own state law to the boat, not to mention the messes with
flags.
For the
license you have your state, but in your boat you put the flag you love, so you'll be surprised how many Poles sail in the
Mediterranean, but they are all Italians and French (running away from
taxes and bureaucracies of its own flag)
So there's not a "European regulation" for toilet, but more or less everyone looks at what the neighboring country does.
Generally, there is a limit of 3 miles from the coast, to discharge, in France and
Italy, that I know, it's the same.
It's better for you to search direct infos on the harbors, because each
marina has its own rules (maybe interdiction for
mooring without holding tank, even though the nautical law does not prohibit it).