Well, HIV is not in any way a threat to you or would it present like that. HIV is a sexually transmitted disease for the most part and much harder to get than people realize. Unless you are having unprotected vaginal or anal sex or you are an IV drug user and share needles, you do not have to worry about HIV. As far as an STD, that is also very unlikely if you are not sexually active. Do you have Herpes simplex 1? (cold sores on mouth)?
So ulcers in your mouth are not cold sores or herpes simplex one. Herpes simplex one is on the outside of your lip. If you were prone to getting them, you'd probably know. Let us know if your doctor comes up with anything it might be!