I would worry about a small dog encountering a large snake. I don't think a bite alone would hurt much, but for a Yorkie, just the impact may shock him, also depends where he gets bitten. A large snake may mistake him for a rodent and try to eat him, if he is very small.
Most non venomous snakes have an anticoagulant in their saliva, so a bite could tend to bleed longer than one would expect, and depending on the size of the snake may present a problem in a small animal.
Coluber constrictor priapus - Wikipedia, the free encyclopedia