I would argue it depends on the provocation. If a little kid is hitting an animal with a stick and the animal attacks, that is self defense against assault with a deadly weapon. If the animal is a human anyway. If the animal is my dog I have to put it down.
Dog is your responsibility! Use leash, muzzle or keep it at home!
If it is dangerous (like you admit), destroy it!