NYC is a series of islands (well mostly, The Bronx is on the mainland of the US) and has plenty of its own beaches plus other nearby beaches in neighboring areas. I know of no NYC school - elementary, middle, or high, public or private - that has a pool. I'm sure a few do, as we have thousands of schools, but its pretty rare. I do think all the 4 year City University (CUNY) schools have pools (which I believe only open to staff and CUNY students), and there are public pools, also a decent number of apartment buildings and gyms have pools, plus a bunch of private pool clubs. But I think a LOT of NYers don't know how to swim and even more have no reasonable access to pools.
I can sorta swim. My parents put me in swim lessons as a kid at a local seminary college, but I was pretty terrified and the class really didn't teach me how to not be terrified, the instructors were just exasperated by the idea of fear of water. But I went to a bay beach (read: no big waves) often in the summer as a kid so I learned to do ok. I still won't put my face in the water though. But its pretty much a moot point as I have no access to a pool. I can't afford the Y (about $1k a year), I have no reasonable way to get to the local Parks Dept pool (its pretty ar from any public transit), and the local pool club is expensive and uninviting (something like $600 for the summer, no guests, no day passes, very cliquish, etc).