I never go to swimming pools, because there's too much chlorine in the water. The reason there's too much chlorine is because there are too many germs.
I don't think urine is the problem, because there are no germs in urine, unless you have a bladder infection. The problem is the nasty warts and other viruses.
The sea is, of course, where they empty the sewers. Ships also tip their effluent straight into the sea. There are lots of dead bodies in it, too. But the sea doesn't need chlorination because it's very, very big.
So, when you go swimming in the sea and swallow a mouthful, you only get a very tiny bit of raw sewage, bilge-water and rotting corpse, but not enough to do you any harm, probably.
When you go swimming in a swimming pool, you get enough chlorine to turn your eyes a funny colour and make them hurt, and that's why I don't go there.
In the UK, I don't go swimming in the sea either; not so much because the water is poisonous but because the beaches are full of detritus, including junkies' hypodermic syringes.
Lakes in sparsely populated areas are best, but check first for crocodiles, pirana fish and nasty little venomous things that also have a preference for very clean water. A bottle of Brobat will probably keep them away, but then we're back where I started.
To answer your question, do I pee in swimming pools? I did once when I was very small, and that's what started me thinking about the above.