The “baignade en eau vive” (swimming in rivers or lakes) is quite popular in France. The president Jacques Chirac is remembered by (amongst other things) his 1977’ s unfulfilled promise (being then mayor of Paris) of making the Seine suitable for swimming. But you have to take notice that France is a country with great wines, very good cheeses, marvelous landscapes...and lot of regulations. Contrary to other countries, where regulations are seen as a limit to freedom, in France they are considered as the fabric of civilized life.
Some rivers and lakes are restricted to swimmers, because of human or industrial pollution, dangerous waters or because they are used for commercial navigation (yes, the famed “peniches”). And, as they say, “la loi c'est la loi”, and fines are usually very steep (although sometimes the “gendarmes” show some leeway). So, I’ d ask the locals, look for signposts (don't do if it says "baignade strictement interdite"!) , or the presence of local swimmers.
Buen camino (and good baignades)!