No matter what your horse does or the conditions he is kept in can not determine whether he will or will not have ulcers.
They are easily maintained and treatable without worry. There are a several different medicines on the market such as ranitidine(zantac in higher mg pills) and omeprazole (gastroguard). Those two are both prescription from the vet and the ranitidine is a much cheaper choice but does not work for everyone. Ranitidine works by reducing the amount of acid the stomach can produce and omeprazole works by shutting down the acid pumps entirely. I only personally use omeprazole in an extreme case or a really bad flare up that ranitidine can not control. The problem with omeprazole is when it shuts down the stomach from producing acid, this does affect digestion of hay/feed and disrupts the natural flora of stomach bacteria.
If your vet comes out and does diagnose ulcers you can discuss the pros and cons of both medications with him and he should be able to recommend a place to start. Usually that depends on severity of the problem and how much you want to spend money wise. Ranitidine is worlds cheaper than omeprazole. A 4 weeks treatment of gastroguard runs around a $1000.00, then most horses can be kept on maintenance of 1/4 to 1/2 tube a day. It runs around $33.00+ a tube and is paste form. Ranitidine is typically in pill form and is dosed at 6.6mg/kg which will roughly go to 3mg/lb. If you get 300mg tabs, this would basically be 1 pill per 100lbs of body weight at least 2X's a day. A 250 count bottle runs around $46.00.
I also keep my two boys on a digestive aide that reintroduces probiotics, enzymes, and bacteria back to the gut. I like Uckele G.U.T(gastic ulcer transnutrients)
or Animed Anigest
. The Anigest is the one I am using now cause it is cheaper than the G.U.T. G.U.T runs around .75/day on the low dose and the Anigest is .48/day on the low dose. Animed does not smell as good as the other stuff, but it does not smell bad. The G.U.T smells like hot chocolate powder and if you do what I did and accidently breath the powder in, it tastes like yogurt!
I have 2 right now that have ulcers and are kept on a constant dose of ranitidine. They are being maintained on a very low dose when not being shown. Buck was always easy going but when his ulcers would flare he would become a horrendous horse. He would bite and kick and rear and wanted no other horse or human near him. Put him on the ranitidine and he is back to his old happy self. The other horse I have on ranitidine would lose weight and sucks on his knees when his ulcers would flare. I have not personally witnessed him doing the sucking the knees thing, but that was what the previous owner told me he does if his stomach is hurting him.