In your situation, "a" is probably the more appropriate word since you find a new dentist when needed rather than sticking with any specific dentist. The fill-in-the-blank question was a poor one because it assumed typical practices, which are not universally applicable.
"A" dentist refers to any dentist. "The" dentist refers to a specific dentist, but it is commonly used to mean "your" dentist.
If you're talking about any kind of service provider for which usage isn't routine, and you select a provider when you need one, general practice is to use "a" when making a generic reference. For example, "How often do you hire a plumber?"
For matters that involve periodic service or visits, and people typically find a professional they like and stick with them, common usage is "the", meaning "your", when talking in general terms.
For people with ready access to health care, seeing a dentist typically means seeing a specific one. General practice is to use "the". For example, "How often do you go to the dentist?", meaning, "How often do you go to your dentist?" But there are exceptions.
If you have a new medical problem for which you have never seen a practitioner (or are in a new location and have not yet seen a local practitioner), and have not yet made an appointment with a specific one, you would say, "I need to see a dentist". Once you make an appointment with a specific dentist, you would say, "I'm going to the dentist", in this case meaning just a specific one.
If you were getting an initial exam at a new practice and the hygienist inquired generically about your oral health practices, the question might be different depending on the state of your mouth. If your teeth were in good condition and suggested that you get routine dental care, they might ask, "How often do you see the dentist?", assuming you have a dentist who you regularly use. If your teeth were a mess, suggesting that you don't get routine exams, they might ask, "How often do you see a dentist?", assuming you may not have a dentist you regularly see.