Typical mouth ulcers or "canker sores" are caused by the herpes virus.
There are many different types of herpes virus e.g. chicken pox, herpes type I and herpes type II, the elderly can get "shingles" which is the recurrence of dormant chicken pox virus. The list is very long.
Over 90% of the population has been exposed to herpes type I-generally accepted as the type to give you cold sores.
It seems that almost anything that can trigger an autoimmune response can result in a herpes outbreak-or in other words a cold sore. Stress, sunlight, hot foods, mechanical irritation, acidic foods, poor nutrition, lack of sleep. All these things can lead to a cold sore.
As far as treatment goes. They usually resolve by themselves within a few days. DNA analog medications such as Valtrex, Acyclovir or Famvir may be effective for some if taken early as signs or perhaps before signs begin.
But usually they are self resolving and of little worry in a healthy person with an intact immune system.
You maybe sensitive to the dentist's gloves though I doubt that any dentist is using latex gloves anymore. The rubber in a mouthpeice may cause irritation but it's probably more of a mechanical factor than a chemical one.