If the horse gets a chance to, that dog will be toast under her front feet. Just the way it is. The dog is interacting in the photo in a confident I won't back off way and the horse is reacting with the attitude that you will back off if I don't kill you with my front feet.
Riding should be fine.. if the HORSE is trained well and YOU are a good rider and can make the horse pay attention to YOU. Loose? Keep the dog(s) out of the horse pasture. Horses will kill dogs.
I have had horses that would never lay a hoof on a fox hound out fox hunting that would kill a dog (any dog) loose in the horse pasture.
You will NEVER trust this mare with that dog. I will never trust ANY horse with ANY dog.