Please, please don't worry. The level of anaesthetic, and the minutes she will be 'under' surely won't hurt.
If you've got any doubts, contact the dentist, and her GP, and ask about the possible repercussions, but teeth can be taken out rapidly, and since the dentist knows about dementia, he or she will give the minimum knock out, and this shouldn't cause any major problem.
Trust the dentist.
The effect of the anaesthetic will be far less than the effect of the major gingival streptococcal infection she's fighting against now, day to day, which will be wearing her out.
Keep the faith.
OK?
All the best.
Beej