My tooth rotted many years ago with a large cavity and wasn't pulled. Can a general dentist be able to extract the remaining pieces of it?

Possibly. Depends on the skills of the generalist.
Yes but. I would recommend that you see a specialist Oral Surgeon. Neglect has resulted in a compromised operative field. An Oral Surgeon is best trained, equipped, and experienced to resolve your problem quickly and efficiently.