All she could do was to ask for help.
Question: Is the particle to needed after was or not?
All she could do was (to) ask for help.
The infinitive marker to is optional here as we have do in the subject noun phrase.
(I deleted the second part of my original answer.)