I think how you handled the situation was fine; you got her to move her feet...
To deal with it in the future, I would just keep a strong feel of her, and 'back off' of whatever you are doing, before she gets too flustered. Go back to something easy, and then come back to whatever you are doing, when she is relaxed and calm once more.
That she did this "I'm done" rearing routine before (and it worked), means you need to ensure you don't push her to her limits when you do get on; keep sessions short and sweet so that she doesn't get the chance to rear. Eventually you will find that you can work her longer and longer without the fear of her blowing up.
"The ideal horseman has the courage of a lion, the patience of a saint, and the hands of a woman..."