My parents are professional vets with a lot of medical experience and they say Bicarbonate of soda on the ulcer (baking soda is the normal name I THINK) helps. Not too much, on the ulcer, press it there for a longish time (at least 30 seconds), then spit it out, because You may feel slightly sick if you mix all that bicarb with the acid in your stomach
So Bicarb to ulcer > 30 seconds > spit out bicarb > rinse mouth with water > repeat as necessary.
My brother gets ulcers often, and this always works.