It might be easier to separate them. If that isn't possible, you just need to train your horse. First, take her away from the pony, and always remember to reward her, when she acts nicely. Don't panic or give up if she want's to go back to the pony, but when she acts nicely, tell her she is a good horse and reward her by letting her WALK back. Never let him rush or hurry back, it might be dangerous. When she is relaxed even when there is little distance between her and the pony, you can little by little made the distance bigger.
When you want her to stand still, make her stop, reward him BEFORE she starts to prance and ask her to walk again before she does it herself. Always are faster than the horse, and reward her when she does something right. And again, when she stands five seconds still, you can stand ten seconds etc. If it starts to prance, stop her again, reward and ask to walk.
You'll never get to heaven if you're scared of getting high