Yes, you can get a UTI from a swimming pool! I looked into this a little more to make sure that I'm relaying information confirmed by experts.
According to the Urology Care Foundation (which can be found at urologyhealth.org), swimming pools can have germs present that enter your bladder and cause infection. These germs get into the pool from other people - people who haven't showered off properly before entering to pool or who are peeing in the pool. Yikes!
If you think you might have a UTI, you should visit your doctor and leave a urine sample. It's an easy test from something that can make you feel so miserable.