The spook and bolt could definitely be related to an ulcer flare up but at the same time I would also be highly suspicious of a possible predator in the area like another poster mentioned.
It also could just be a freak one time incident.
But the one and only time my TBX gelding has spooked, bolted and not been able to calm down was when I was trail riding with a friend in the woods and we suspect there was either a bear or mountain lion in the vicinity. Both horses absolutely lost it as we were crossing a stream next a rocky hillside that appeared to maybe have a den or cave. I was able to stop my horse using a pully rein and my voice but he never did settle even long after we left the site of the cave. This is not like him at all. I have had him for 6 years and we’ve encountered many spooky scenarios on the trails and he has spun, jumped or scooted a few feet but he always is able to settle afterwards. 2 weeks later two completely different horses and riders from my barn had the very same problem in that same location! Needless to say we stopped riding over there.
That day both horses would not settle AT ALL until we exited the woods, as soon as we exited the woods they acted like totally different animals, completely relaxed. The fact that you said dogs also find this area of the woods peculiar would put me on high alert for a possible predator as well.
I think it was wise of you to dismount! Some people say you were abandoning your horse but some horses are more confident with their owner leading them so that’s not always the case. My horse being one of them. I can ride him past and through almost anything but I have never had a scenario where he refused to lead after I have dismounted due to safety concerns. Just make sure your horse is very well broke to lead over obstacles as I have seen friends get jumped on while leading green horses on trail through trappy crossings.
You also have to think about your safety first listen to your instincts which is exactly what you did.
My advice?
1.) Learn and practice the pulley rein/emergency stop.
2.) Singing and talking to your horse helps too. My horse loves it when I talk him through something scary and I have used singing when riding by myself through dense forest where it’s common for packs of deer to jump out of nowhere. If animals know your coming it’s less likely they will surprise your horse.
3.) I agree with teaching your horse a “cue” to keep their focus on you. For me it’s a “cluck” and leg yield. When I use this cue he knows he is supposed to direct his attention towards me.
4.) work on leading your horse in hand past scary situations and getting his 100% trust while on the ground. Take him on handwalks in the woods sometimes. That way if you do ever need to dismount it will hopefully be less likely that he will bolt off.
5.) Learn to dismount by kicking off both stirrups, swinging your right leg over and quickly pushing yourself off your saddle and jumping down so that way you don’t have one foot still in the stirupp.
Hope this helps!