Air guns have lower energy than firearms. There's obviously a huge variety of them, but usually the strongest ones are a bit weaker than a .22LR round.
.22LR is a weak round. It's not that it can't kill an animal - it can easily go through skin and make ways through the squishy bits. It could nick an artery and then you're done. However, it does not have stopping power. If you are truly in a self defense situation, it means you have seconds left to live. In that situation, it is not enough to cause injury to the animal that will eventually kill it, you must cause massive injury that will stop it now, despite all the adrenaline and momentum of its charge at you. Worth noting that in a life-or-death situation your motor skills will degrade and your marksmanship will suffer as well, so you can't rely on shot placement.
.22LR is used to hunt small game, like squirrels, because it can reliably kill them quickly. Might be okay for a coyote (not coywolf). You will see people brag about taking down deer, hogs and larger animals with it. But these are advanced sportsmen, who try it over and over for the challenge and the bragging rights. The one time it works they tell everyone about, but many times it does not work. Not something you want to bet your life on.
Your air gun will almost certainly be even weaker than .22LR. Usually the same anti-gun politicians also cap the power of air guns so that they are less powerful than .22LR. So my conclusion is that no, air guns are not a viable defense against large animals. Certainly not in Canada where you have moose, grizzly bears and wolves. I'd say it's likelier to just make the animal madder and more aggressive. You might be thinking that the pain of being shot with an air gun might discourage an animal - but were it so timid as to be put off by a little pain, it would not attack you in the first place.
As for pistol vs. rifle: The point of a pistol is that you can conceal it on your person, but the shorter barrel length makes them less accurate and reduces the energy of the bullet. It's easier to aim with a rifle, and the recoil is less because of its mass, but the pistol is easier to maneuver in very close quarters. Normally, self-defense implies that you have no real alternative, which doesn't really make sense if the animal was 300 m away. So presumably the weapon you use in self defense would be used primarily at close range. You're probably better off with a pistol, assuming equal power. But again, this is more for large-caliber firearms like .357 Magnum. An air gun will not be a good choice regardless of whether it's a rifle or pistol.