It is my sad duty to tell you that you can. You can now change your name to I.P. Freely. Fear should not keep you from peeing in a pool – just shame.
Most of us have heard, at some point during our childhood, that before we go in the pool there was something we should know. Everyone knew that sometimes people peed in a pool. Knowing that young children often took advantage of this – pool managers put a chemical in pool water that reacted to urine. If someone peed in a pool, they'd be surrounded by a cloud of colored water and publicly shamed. It's such a common belief that some pools put up signs saying that they treated their pool with such chemicals, and it was featured in a movie, Grown Ups, in which four adult men were found out in such a manner.
This is a matter of concern to a concerning amount of people. There are plenty of sites on the internet addressing the idea that there is a compound that changes color when exposed to urine. Is there such a compound? The answer is yes. The problem is, it would react to a lot of different organic chemicals as well. Urea, a compound found in urine, is used in a number of different ways, all of which would lead to angry, embarrassed people in a swimming pool.
Manufactured urea (not harvested from actual urine) is used as a tooth whitening agent, a flavor enhancer in cigarettes, an ingredient in moisturizers and conditioners, and in textile dyeing. That means that a lot of people, upon diving in the pool, would come out with dyed clothes, hands, skin, and mouths. And all of them would complain.
This doesn't stop public pools, swimming clubs, and private owners, from regularly contacting various pool supply companies and asking for the dye to put in their pools. I find this quite heartening. People complain often about the irresponsibility of companies today, but think about it. As soon as someone let loose a cloud in their pool, they'd have to drain it, clean it, and re-fill it. The fact that they're willing to do that rather than let the public immerse themselves in urine is very sweet. The fact that most of the pools would probably be drained full time – is not something we should think about in depth.