Although my British Grammar School had an outdoor swimming pool swimming trunks or shorts were compulsory at all times and sunbathing in the area outside the pool was banned. There was a bus route going past the rear of the school and upper deck passengers could see in, so no nude swimming at any time. The changing area at the sides of the pool was also open to bus view so we all got changed with our shirts on, not removing them until our trunks were secure.
Other schools at the time had a policy of forcing boys who had forgotten their swimming trunks to swim naked. A great example is the school in Birmingham described by Jonathon Coe in the Rotter's Club
https://www.amazon.co.uk/Rotters-Clu...e+rotters+club
The main character a 1970's schoolboy leaves his swimming kit in his father's car and knows that unless he can find swimming trunks before PE he will have to swim naked and his life will be destroyed.
At the last moment he prays to God, the wind blows a locker open revealing some pretty awful swimming trunks and he becomes a Christian.
Read the book, it's funny but also deeply shocking.