According to IMDb, he did not have to hold his breath. They used an oxygen tank:
In the Warner Brothers DVD, McDowell does a commentary track and talks about how he used an oxygen tank while he was under the water. He never mentions that it failed or that he almost drowned. Also on one of the documentaries on the DVD, the commentator mentions that McDowell did 28 takes of that scene, so the tank must have been working.
And a relevant bit from an online 2002 interview with McDowell:
Q: How long were [you] down in the drowning scene?
MM: Was it that long? Well, it's a trick.
Q: Did you have air?
MM: Of course I did! Are you kidding? It was freezing water. You put your head down in freezing water you can only stay down for three seconds. That was it. England in the winter time - they couldn't even heat the trough. They put some dye in it, barberil - three or four bottles of this, and beef extract. They put [an] oxygen tank in there with a mouth piece. It was like bobbing for apples. Once I had it we were in good shape.
So the rumor going around that McDowell nearly died during that scene seems bogus. However, McDowell implies that he did initially have some problems with the apparatus in this interview:
So Stanley actually put an oxygen tank in the thing with a (tube), but I don't know how many takes before I was able to grab hold of it and then breathe.