Yes you can punish growling.
If you are walking with your dog down the street and a family is walking by you and pushing a stroller and your dog growls, punishing that growling is extremely fair and absolutely necessary.
On the other hand if someone walking towards you and the dog and they are reaching their hand out and your dog growls, different story and you need to advocate for the dog and work the dog through that situation but also you the human need to push away the source of the pressure.