First off, if the state park has a leash regulation, and the dog was off leash and out of control, go back or call the parks department and report the incident. Don’t be worried that you cannot id the dog, maybe this is not the first time it’s happened and somebody else saw something.
Second, carry a whip like a longer crop or dressage wand even, put a clip on it and clip it to the saddle if you don’t want to carry it. If the dog jumps up, you can nail it. But with pits or pit mixes, stay on the horse but move off out of the area as soon as possible, because their bites are so much more dangerous, they can clamp on.
Pepper spray works very well on dogs, but don’t hit the horse or yourself with it. I mean, it REALLY works if your aim is good, the dog should drop and run off.
If it’s a little yippy dog I verbally warn the owner the horse is going to kick it, and then watch them scramble to retrieve it. This is not really true, but it does motivate them. If it’s a little yippy dog by itself, I will trot at it, and it usually turns tail. I ride with my dogs at home all the time, so the horse is used to dogs running underfoot. If I’m leading the horse along and a dog comes running up, if the dog is being stupid I will threaten to crop whack it. Some dogs are actually friendly, so I just sort of go with what happens.
The important part is to control your physical reaction that your horse is reasured by what you feel like that you and he can get thru this obstacle without panicing. You can control your physical response even if you are are afraid, you can still sit quietly without butt-clutching, remember to breath, and look where you want to go and not directly at the dog.