One thing I would say is-yes you should have talked to her. EVEN IF SHE DIDN'T LIKE IT-you would have been being honest.
By having sex after agreeing not to-before addressing it-you lied.
If it were me in her shoes-I would be livid. Breach of trust no different than cheating.
I'm NOT saying she was right in her demands.
But you are completely responsible for being honest and upfront. That includes "when things change".
I don't accept the "heat of the moment" excuses. If the heat of the moment is so severe it results in feeling like it's ok to lie-that person isn't the right person for me to date. Period.
It is a difficult lesson to learn "the hard way". I've been on the side of not being upfront and honest IN ADVANCE. It sucks and lots of people can be hurt. Just not worth it.
"Love As Thou Wilt"