If its a good friend then I would hope they understand your situation. Just have a chat and say that you would love to come and plan to accept the invite, but you just want to make sure she is happy with that as you may have to pull out at short notice if you just dont feel up to it, or if baby comes early etc.
If you accept the invite, i think it is important that you still feel able to change your mind closer to the time, when you will have a better idea of how you will feel on the day. The health of you and your baby are much more important than anything else and so if you dont feel like going the day before, then you must feel able to decide not to, without it upsetting you (by knowing you are upsetting your friend).
And definately take all of your hospital kit etc with you just in case!
Ive been invited to a wedding the day before my due date and have had this chat with my friend who understands that I might not be able to go. Ive also decided to just attend the evening part so that she can invite someone else in the daytime in my place, so I dont feel pressure to attend because ive had a dinner place paid for me.
I've been invited to one 10 days after my due date. I gave our apologies, but the bride, who's been a friend for 20 years, wouldn't accept it! She's got 2 kids herself, and says she'd have been fine after DC2, but not a chance in hell with DC1, so she's totally happy to wait and see if I make it, and if I don't, someone else will happily eat my dinner!
We went to one 2 days before my edd and I wasnt very comfy but I was ok. It had originally been planned for the Saturday night but the bride and groom changed it a few months earlier to the Friday instead. Lucky for them they did as on saturday night my waters broke all over the kitchen while having dinner with my friends!! That would have been fun at a wedding!!
OP - I'm off to a wedding a week before my due date as well! Friend being very understanding that nature may have other ideas and I could be over wise engaged, but I will pack hospital bag and notes, comfy shoes, check where the nearest labour ward is and hope for the best. Good luck