Possibly but spray is shotgun like so your pet may get blasted if the coyote has it.
What I do when I hike around the neighborhood with a weighted pack to keep in shape is carry a 4-5 foot 1”dia. hickory stick as a hiking staff. I stained it for aesthetic purposes so it looks fashionable and capped with a plastic cap for furniture legs to keep the wood from being chewed up on the concrete.
The other end has the end cap from a Greek spear fitted on it,commonly called a “lizard sticker”
http://www.bytheswordinc.com/p-807-greek-buttcap-for-greek-spear.aspx
I wrap the end cap with a large handkerchief kept in place with some heavy rubber bands.
I use it as a dog deterrent. All I have done when menaced by some local Fido who wants to make an issue of me being on the street is invert the pole keep the point between me and the dog and offer the cloth wrapped end for him to bite. When his teeth clamp down on steel it sends a good shock through his jaws. Fido yelps in pain and backs off.
If worse came to worse you could thrust straight into his mouth like a spear plus the shaft works as nice cudgel and the set up looks quite innocent.
I was thinking more on accosting them on hikes. But I carry so there’s no problem there. Hikes meaning up in the mountains.