Any injured animal, no matter how gentle or well-controlled, can bite when injured and hurting. In fact, an injured animal is likely to bite, even if you are trying to help it. They simply cannot understand your intentions. All they know is that what you are doing is causing pain, and they want to stop you.
It's important to be able to muzzle a dog in an emergency. You don't need anything special as far as equipment goes. Most people have a muzzle with them all the time, and never know it. What do I usually recommend? A shoelace. It is light, strong, and almost everyone has one or can get one fast.
To safely muzzle a dog, first get the shoelace (or equivalent piece of cord, rope, leash, whatever) and tie a loose knot in it, with the loop left open. Slip the loop over the dog's muzzle, as in the first picture, then tighten the knot so that the dog's mouth is closed. you don't have to make it tight enough to hurt, just close the mouth so you cannot be bitten.
Once caution in this step - until the loop is secured over the muzzle, the dog can bite. Be careful. If it is not your dog, be particularly careful. You might want to wait until the owner arrives, or you can get help. If you decide to go ahead and help the dog, use utmost caution and make sure that other people are also out of danger.
After the knot is snugged down, pass the ends of the shoelace under the chin and cross underneath. This adds a second loop to the muzzle and will help it to stay on.
Lastly, tie the shoelace ends behind the dog's head to secure.