This should be down to the common sense of the owner. If you have an uncontrollable dog, then you shouldn’t take it on the trail. My last dog was a small one but I would still put it on the leash when other hikers were close by.
Nearly all of the dogs I have seen on hikes have been well behaved.