If the attacker in this hypothetical circumstance is employing non-lethal force, you cannot use or threaten to use deadly force. It signifies that you would be breaking the law if you shot or attempted to shoot the individual. In court, such an activity could not be used as a defense. However, depending on the circumstances, something different might happen at trial. For example, if there was a history of violence between you and this person, or if it was discovered that they had a gun on them, then a jury might find that you were justified in using deadly force. The only time it is legal for someone to be shot to protect others is if that person is actually causing harm or threat of harm to others. For example, if a person has attacked another with a knife and you can get away safely, then you should leave before anything worse happens. If there is no way to escape unharmed, however, then you have the right to defend yourself. In conclusion, yes, you can shoot someone to protect others. But only do so if there is no other way to prevent serious injury or death.