Most girls aren't like guys in that they can make decisions spontaneously. They have to know about stuff like this at least two weeks before, so they can get emotionally prepared, fantasize, write it in their diary and/or notify their all their buddies. Not to mention, raising the issue with their parents. Unless you have a good chick friend, it would probably be too sudden and slightly overwhelming for her.
Plus if you do it now, it'll just look like you're asking her because you've run out of options. You'll just make her feel second rate, even if she is your good friend.
Asking weeks in advance is not only to secure a decent date for the night, but also is an act of courtesy.
Hint: Ties matching is not relevant your situation.