Not a lawyer but if you've been there 6 years you can't be dismissed on the spot, I don't think a mistake would be considered gross negligence and it would be a high risk to backfire into a wrongful dismissal claim.
Can you ask if you can take a friend, colleague, adviser etc.?
I think you should go to the meeting and really not say very much. Definitely don't admit to anything or offer any excuses. Definitely don't quit on the spot, or even before. Just listen to what they say, tell them you want some time to think about it (whatever "it" is).
It's in your favour that you have 3 months notice and they are short of staff. It buys you time to look for another job whilst you are still employed - very important. And maybe you'll get a severance deal to stay the full 3 months.
Brush up the CV, update LinkedIn and ensure it says "open to offers". Don't think about downgrading your job, look for something at the same level. Try to move on (if necessary) to your schedule, not to theirs.
I don't know how big your mistake was, once about 20 years ago I made a mistake in a spreadsheet formula that meant the company couldn't pay a dividend of $80 million that it had been promising to shareholders... I didn't get fired or even carry all the blame, because there should have been more checks and controls over the spreadsheet that I had written from scratch.