Some hiking trails will allow dogs to be on the hiking trails with you but some hiking trails may prohibit dogs being on the hiking trail.
If the hiking trail prohibits dogs on the hiking trail there will be a sign or should be a sign letting you know if the dog is prohibited.
I've seen some dogs on hiking trails and that's okay as long as the dog is well mannered and not mean to people.
If the dog does poop on the hiking trail make sure to pick up the poop and dispose of it properly so people won't step in your dogs poop.
That's one reason some hiking trails don't allow dogs is because they poop on the trails and people step in the poop.
But they may also prohibit the dogs because of potential harm to people if the dog decides to bite.
It's all up to the hiking trail as to whether that certain hiking trail allows dogs or not but some do and some don't.