Stress is usual cause of stomach ulcers in horses. But can also be caused by lack of eating, not enough roughage in feed plan, and the extended use of medications such as Bute or Banamine.
Sudden personality change, suddenly angry
Puffed out belly
Extreme dislike of having belly touched
Protesting at moving above a walk (trotting and above jostle the stomach and cause pain)
To diagnose, the most sure way to determine is by scoping. However, if that is not possible, some may choose the "guess and check" method using medications such as Gastrogard and Ulcergard. Both are extremely potent and if a horse has ulcers, a change back to normal attitude will be noticeable.
Here is an entire website about ulcers: Gastric Ulcers in Horses: Causes, Signs, and Treatment
Your horse sounds more like a high-strung 3 year old to me rather than a horse with ulcers.