Basically you'll be a part of Operation Flouride where you'll run out in front of the soldiers and protect from incoming bullets, much like how flouride protects teeth from cavities. DENTISTS LEAD THE CHARGE!
Yes, you'll still be doing dentistry. In the medical unit I was in during our deployment, we'd always joke it'll be a really bad day for the Army if the pediatricians, nurses and dentists need to start shooting. You will need to know how to use your weapon, because one day you might actually have to use it. The only time dentists are really exposed to any danger is during convoy. Insurgents have been known to shell compounds as well. As far as I know there's been only 2 dentists hurt in combat zones.
Dentists are noncombatants and are prohibited from offensive combat operations... that said it would be a good idea to be proficient with the M9 and M16/M4 for defensive purposes.
Nothing like that in the Navy - you're either under a military treatment facility of some sort, under one of the Dental battalions with the Marines (but they're still clinically focused) or on a ship in the clinic.