Hello
Your dentist could be right it may be due to the third molar tooth
You could go for third molar tooth removal and wait for it to heal up
Also if you are worrued about oral cancers then you could consult an oral pathologist and get it checked and then proceed with your treatment
Next Steps
Get an xray done or consult an oral pathologist for further conformation
Health Tips
Maintain good oral hygiene and have a oral heath check up every year