My baby girl has been taking swimming lessons from the age of 3 months, with her head or at least ears most of the time in the water. She's been doing that for 2 years hitherto with a lot of other babies or children without any illness or so, so I guess this is definitely not a big deal. We were also never invited, was it by the teacher or even a MD to be careful about that.
Now some children will be more subject to ear infection or so, for sure, but I wouldn't say as a general advise that getting water in the ears is somtehing to avoid...