Others have pretty well covered it, as it's a normal part of the primary-school curriculum in much of Western Europe.
At minimum, I'd love to see survival swimming, treading water, basic pool safety in kindergarten (age 5).
We could also add the above to Head Start - that gets pool safety done earlier for disadvantaged kids (who are less likely to get it from their parents). Most of my peers start pool activities when their kids are infants and continue through swim team in primary school, but that's a very middle-class thing and costs a good bit of money/time.
In the Netherlands all kids have to learn to swim, and are taught during elementary school. There's various levels, the 3rd (IIRC) being able to navigate an underwater "obstacle course" while in school clothing and even with a backpack (I guess in case they fall into the canals on their way back from school). The obstacle course is something like just squeezing through a generously wide hole.
Swimming lessons in school, from age 8 or so, organized like any other education (every second or third gym lesson in a couple of semesters was how it worked for me), and no need for consent?
Pretty sure that's how it works in most countries that have public swimming education.
We had this our freshman year of high school (NYC suburb, USA).
Perhaps I'm biased from growing up in a coastal town where swimming was a very popular competitive sport and lots of people had boats, but teaching kids in middle or high school is WAY too late IMO, this stuff needs to be taught at a much younger age - like 4-5 years of age.