From what I've read, it can be common practice to punch the drowning person to stun them and stop flailing limbs.
Don't punch them, it's less effective and can knock them unconscious, which can complicate the rescue.
Source: was a trained and certified lifeguard and swim teacher in my teens.