I have a dog who bit someone who was attacking me. It was even investigated by the police and ruled a "justified bite." You'd never think he was a protective dog normally, he's super friendly and outgoing to strangers and I've never so much as heard him growl in annoyance at a person. If I'm uncomfortable in a situation with a person, he'll stand quietly beside me but not growl or bark. Yet when someone actually did attack me, he attacked the guy and kept attacking until the guy retreated.
On the other hand I have a dog who will growl and bark and snap at strangers very quickly. Same situation (literally, I had both dogs with me), that dog hung back and didn't do anything. Would he have done the same if my other dog hadn't stepped in? Probably. He's reactive out of fear, not protection.
My GSD is another who is really friendly with strangers and I think he'd protect me, because his reaction when I have been threatened (not really badly, just some kids goofing off and trying to scare us when we were running at night) was to calmly put himself between me and them and growl, but I wouldn't count on him to do so. He's a very nice deterrent and I feel very safe with him because I don't think most people are going to approach us, but I'm not expecting him to attack because he isn't protection trained.
So there's three real-life examples to kind of illustrate how I feel about it. Basically, if you don't have a protection-trained dog, you can't count on it. You also shouldn't encourage any sort of aggressive behavior towards strangers short of structured protection training, because it's unpredictable and may get your dog an "unjustified" bite history.
I mean im 4"11 if I dont yank the leash back, I fly with the dog. So what I do is yank and walk away from the scene. I dont tense up when my dog is acting crazy.. I just pull her back, start walking away.
Consider trying an age-appropriate gentle leader-type device (either a head collar or a front-attached harness are my favorite on adult dogs, haven't had a pup in years so I'm not sure there). Yanking, even to keep control, will have a negative effect on your dog in that type of scenario. It's better to prevent it from happening in the first place.