Chlorine/stye. although it may sting, or burn at the site of the stye, should not harm you. See your eye care doctor before you get in the water.
If infected, no! If you have a stye in the eyelid margin, don't get your face/head wet in a chlorinated pool or jacuzzi. It may irritate it further. Always think prevention & caution from it getting worse, and being safe. Better to use warm compresses 3-4 times a day for 10-15 minutes and heal it, to decompress it. Then once healed, and not inflamed, swim away! :D.