Dentistry is a specialism of medicine. It's no different to a urologist or cardiologist etc... They are specialist medics/physicians in a specific region/system of the body. The only difference with a dentist as opposed to say... a rheumatologist, is that a dentist has do their specialist training up front, alongside the standard medical training. They graduate as practicing specialists whereas a medic would then go on to do 2yrs foundation followed by a few more years specialist training.
It is for that reason that dentistry is a harder degree. They have about half the time as other medical specialists to train.
Alongside the standard medical stuff (A&P, pharmacology, radiology, anesthesiology, surgical training etc) dentists also have to do their specialist training as well as master clinical skills on their own patients from about year 2 onwards (the stuff Dr's do in year 6 and 7). That's why dentists graduate on about 3x the salary as jr. Dr's and they can walk straight into private practice as practicing clinicians from day 1.
And my understanding is that, as part of a BDS degree, as well as the specialist surgery component, a dentist has a license to prescribe - exactly the same as a G.P does. They wouldn't get that unless they'd done extensive training in medical pharmacology and knew what they were prescribing.