Yes, you need to wait until the d-mange is under control. The reason is simple: demodectic mange is an immune system problem. Demodectic mites are present on all dogs, but only those with under-developed (ie puppies), compromised/suppressed or defective immune systems develop mange.
It commonly affects puppies because their immune systems are just developing. In most cases, that will be localised mange only, but a small percentage (who actually have defecive immune systems) will go on to develop generalised mange - affecting most of the body. And generalised mange is much harder to treat.
Anyway - since it is an immune system problem, the key to beating demodex is boosting the immune system as far as possible. That can be achieved by a very high quality diet and supplements - and avoidance of unneccessary stress. There is no doubt that a surgical operation is stress, and a lot of work for the immune system. So it is not a good idea to subject a dog that is battling mange to additional stresses on the immune system, spaying surgeries included. The consequences of doing so could include the development of generalised mange... So, you need to boost that immune system as much as you possibly can, and once the mange is under control, she would be in a position to cope with a spay surgery.