The OP asks,
[w]ould the law have permitted me to use the weapon to either scare off or shoot the dogs . . .
I know more about Texas law than any other state, so I'll use that as an example.
Texas, like most jurisdictions, has a statute that justifies the use of deadly force to protect another person against a threat by a PERSON.
So in Texas, you'd have to go back to one of the more general statutes in the chapter on Justification. In this case:
Texas Penal Code. Sec. 9.22. NECESSITY. Conduct is justified if1) the actor reasonably believes the conduct is immediately necessary to avoid imminent harm;(2) the desirability and urgency of avoiding the harm clearly outweigh, according to ordinary standards of reasonableness, the harm sought to be prevented by the law proscribing the conduct; and(3) a legislative purpose to exclude the justification claimed for the conduct does not otherwise plainly appear.
I think a jury would agree that trading a wild dog for a child is just fine.
As far as a civil suit by the zoo goes, I can't believe they'd have the nerve to file one.