I take my dog with me almost every time I go out (unless I am going for a lesson or schooling). She is well trained and goes just in front of me, so I can see her. She understands 'in to the side', 'wait', 'sit', 'onto the pavement', 'onto the grass' , stay with me' or 'on you go' and even knows how to swap sides of the road if we are going right at a roundabout (I know you are supposed to stay left, but due to poor visibility for oncoming drivers on some of our roundabouts we have to cross). She also knows to stay on the pavement even when there are parked cars between her and the horse, ditto at situations where there is a barrier (like at traffic lights), to stop and wait for a commend at junctions, and on country roads to get onto the verge and sit when a car approaches.
She gives my horse confidence - if there is something spooky ahead I can send her as a sacrificial dog - the horse usually accepts that if the skip / wheelie bin / tractor or whatever hasn't eaten the dog, that might be safe enough for him to proceed (this is where the 'on you go' comand comes in).
As a consequence my horse is supremely dog proof - if she stops in front of him he will literaly pick his way over her! If I meet a dog who is barking or overexcited about seeing a horse, I often ask the owners if they would like to let their dog meet my horse - he always bends down and sniffs them gently, and I think that the dogs are less likely to be upset or excited by horses as much in the future.
I did spend a few years training my dog before venturing onto the roads with her - she came with me on off road rides only until I was completely confident that I could control her.