What if the dog keeps coming back? It doesn't gain access to the coop and run, but you have injuries or deaths because the chickens are going ballistic and bouncing off the walls because of the dog doing it's best to gain access..If possible, I would take it to animal authorities. I wouldn't kill an animal just because I dont know who owns it.
For sure, I dont consider a dog, fox or coyote any greater or more important than a duck or chicken.
I would defend my birds if being actively attacked. I wouldnt feel good about it, but I have already made it clear that this is my view. But a dog being on my property? Trying to get into the duck pen? No. I'd do my very best to catch or scare the dog away and then do what it takes to prevent it happening again.