I would think it is more likely the medication than the UC.
Did you have a lot of dental problems when you were younger? The teeth that required root canals, were they filled? Do you have a lot of fillings? I notice that a lot of my old fillings are starting to have issues and I am in my early 30s. I've always had cavities and although they are filled, fillings don't last forever.