As far as how you handled it, I think you did it well. Sounds like you may be giving her a bit too much than she can handle at this point. I would ask her for simpler movements and once she gets them right, pat her and be done with it. Sounds like the rearing is from stress -- It's her form of attempting to escape. Make her keep working so that a rear does not equal the end of the ride, but don't make it difficult. Just keep her feet moving...maybe nice big serpentines. I'd throw in some trail rides and just let her equate relaxing with riding as well.