I used to take my Rottweiler trail riding with me all the time - never used a leash on him while I was in the saddle. IMO, that's just asking for disaster.
I took him through about five levels of formal obedience training (including getting the CGC and ATTS certificates) and practiced the same basic obedience commands (heel, sit, down, stay, come) while I rode in an enclosed area before taking him "out" with me.
He was a really, really awesome trail dog - my horse seemed to enjoy the company, too, since we often rode out alone.
It helps that Rotties are working dogs, and one of the jobs they were bred to do was driving, and he LOVED his "job." Even when we ran into other trail users, wildlife, other dogs, etc. he never left my horse's side unless I actually told him to. On one occasion, I knew there was a loose dog ahead so I had my boy "sit" and "stay" out of sight while I rode on ahead, chased the loose dog back to its house, and then went back and collected my own dog (about 100 feet away) before continuing on.
The biggest thing with taking ANY dog out in public is to be mindful and courteous of other people. Not everyone likes dogs, not every horse does either.
It is your job, and your responsibility, to properly train and socialize your dog. As much as I like dogs, I don't like it when people (hikers, or other horse-people) bring unruly dogs with them and just let them run free. In fact, if someone's loose dog does run up to my horse and starts circling, tryin to nip at his legs, etc. I will politely ask the dog's owner if they would come and collect the dog - or, if they'd prefer, my horse would kick the dog back to them. That usually gets the point across.
If your dog does not have a reliable "recall," it's not ready to be off-leash in a public area.
(this applies to children, too