A dentist can certainly extract an infected tooth, depending on the severity of the case. If the abscess surrounding the tooth has deep roots, the dentist may suggest alternative treatments instead of extraction. Removing an infected tooth can be beneficial for both your dental and overall health. Tooth infections that remain in the mouth can cause more serious infections in the jawbones.
Dentists routinely remove infected teeth, and they do it all the time. Even if you don't experience pain, swelling, or think you don't have an infection, bacteria can still enter the pulp chamber. To get rid of the infection, you should either do a root canal or extract the tooth. If you opt for a root canal, the infected tissue is removed, the area is cleaned, and then sealed to prevent further bacteria from entering.
On the other hand, by extracting the tooth, it is removed from the presence of oral bacteria. In either case, your immune system can then take care of any remaining infections.