You should probably ask the doctor performing the surgery and not strangers on Google
Depending on the type of surgery you may not be allowed caffeine. Don't drink or eat anything before surgery, you can aspirate and die. Literally die. Ask your physician, do not listen to people you don't know. Good luck!
I was told that I could only take my blood pressure medicine and a tiny sip of water with it the morning of surgery. So I doubt it. But you should ask them with any questions you have.
Thanks! Your answer is awaiting moderation.