My daughter (much older...like about 6 yrs) got a few of those. They are nasty little things. It is very hard to get rid of, and the more you stress over it the more they seem to spread. Having a good immune system is key, as it is viral. I took my daughter to a dermatologist and they put a combination treatment on hers (she had about 5 altogether) some sort of prescription wart remover mixed with "bug" juice (cantharidin). If you google Molluscum Contagiousum you will find a lot of info, and many parents who have tried all sorts of things. The treatment did not "freeze" them off. It irritated them, caused them (over a period of days/weeks) to get puffy/pussy and burst and then dry up and go away. My daughter had 3 little ones on her neck, and a couple of them on her knee/shin area. They all went away successfully with one treatment, haven't come back, and no scarring. It DID take about 5 months to get into the dermatologist's office though.
The pool environment is very conducive (wet clothes/towels, people touching each other, lots of exposed skin, etc). It is likely that another swimmer brushed up against her or her towel (or their towel and her towel) and then the towels transferred the virus; or direct contact, perhaps even the class instructor has a spot and doesn't know what it is (many people think they are just regular old warts) rather than through the water, but I suppose it could be transferred just in the water. I wouldn't let my kids swim with an irritated spot, but if they weren't irritated, I just put a waterproof band-aid over them (and we swim at home, not public pools so no one but us was at any risk).
They can and do go away on their own, but it can take up to 2 years. My son had one on the back of his finger and another one at his waist band area for a long time. I thought they were just warts. Until my daughter got then on her neck. I set up an appt with the derm for my daughter (hers were spreading and his weren't) and got hers treated. By the time we went to the derm, his were going away on their own.
Know that your son can infect himself in other places on his body. So it is best to keep it covered with a bandaid if he is prone to scratching at it. Where does he have it on his body? It might be worth scheduling an appt with a derm. to get it resolved. Particularly if you have other children and most especially if they share bathtime.
Try not to freak out about this though. Stress made ME even start getting them... one on the side of my nose/cheek area. The less I worried and resolved that the derm would take care of it, the more it faded and went away. Coincidence? Maybe. but the more I stressed, the more my kids stressed and the more my daughter got. (I was even applying tea tree oil to their bumps every night after baths before bedtime. It was becoming a ritual, and they hated it - said the oil stunk). When I quit stressing, we got rid of them and they haven't come back.