Like Adam and Eve before the fall Mary had free will and were free from sin. If Adam and Eve were then able to reject God, there is no reason Mary could not do the same.
Right there is pretty much the answer.
Grace or the absense of the stain of original sin, does not mean a person is incapable of committing sin.
Like Marty said, Adam and Eve BOTH had all the grace they needed to live sinless lives and yet they still fell into it.
So grace does not eliminate freewill.
One could say that without the Stain of Original Sin, Mary was “full of grace” and therefore Sin had much less of a hold on her… less of a temptation or allure. It was easier for her to see sin as exactly that and avoid it. But she still had free will and it was by her choices that she didn’t fall into sin when the Angel came to her.
She also had free will to NOT follow God, but because of her state of grace, she obeyed God and accepted her role as “Theotokos” - ‘God bearer’ aka “Mother of God”
Just like we ALL are in a state of grace when we leave the confessional or when we were first Baptized. We received super natural grace and it is easier to avoid sin. We still can, however…but grace means that sin has less of, or no hold on us. But it does not eliminate free will or make us robots.
Catholics simply believe that God applied this saving grace to Mary at conception, rather then later, as is his choice, as God.
She then remained in this state when the Angel Gabriel appeared to her and called her “Kecharitomene” - which is a unique title given to no one else in the bible and means “highly favored by God” or more loosely translated “full of grace”