Anyone is capable of accomplishing any task. In this case, a dentist is trained as a dental physician not trained as a medical doctor nor are they trained as a neurosurgeon. Without the right training, certificates, and degrees, it would be impossible for a dentist to go into an operating room and perform surgeries of this complexity and magnitude.
For one, dentistry is concerned with treating issues related to the oral cavity, which can include the teeth and the gums, and while some issues related to the head begin with problems in the teeth and jaw, the professional would have to undergo more education to function as a neurosurgeon. Alternatively, the neurosurgeon not only knows the human brain and how it functions, but they actually operate on the human brain, which takes years of education to do without harming the patient.
Dentists and doctors take some of the same courses as a part of the baccalaureate degree to enter their programs, but that is where the similarity ends. While it would not be impossible for a dentist to switch over to this particular field, they would have to be admitted to a medical college, take course work in this area, and undergo their residency before even attempting to work on the human brain.