It's really a judgment call. If the animal has been penned in an area with lots of walkers for some time, then it's probably used to it, and will take little notice. On the other hand, some folks seem to be saying that animals near paths in their communities are notoriously aggressive toward pedestrians. So, if you talk to other walkers in your area, they might tell you to be careful in a particular area or of a particular animal. If that's the case, you can decide for yourself whether to risk it.
The thing is, nothing's guaranteed (and this is even more true if you're walking with a dog). Even if a particular animal has seen a thousand people walk past and never minded them, something about you, or on that particular day, could still set it off (my husband's cows do not like me at certain times of the month, so I stay away). If you think the animal seems calm enough, and/or is far enough away not to notice you, and if you feel you could deal with the situation (are you close to a fence and do you feel capable of jumping over it if needed?), then go for it. It'll probably be fine. But if you're not feeling particularly athletic, or the animal seems restless or is hovering near the path, or if people have mentioned aggressive animals in that area, then I'd recommend against taking that path.