Is it safe to take Xanax for anxiety 2 days prior to surgery?

I have a 6-hour plane ride from California to Miami. I have anxiety attacks, especially on airplanes so I want to take a xanax. I want to take the xanax on 2/22, surgery is not until 2/24. I am not on any other medications.

