Don’t panic.
If you feel the time is coming then talk to the vet. They would not let him suffer because of this.
My vet is very accommodating when it comes to PTS. I spoke to the nurse the day before I had Patch put to sleep. She talked me through everything including the fact that I wouldn’t need to pay on the day. They said they don’t think it is fair to make an owner do that. The next day at the appointment it was purely about giving me time with him and being then as they let him go.
They sent me an invoice a few weeks later when losing him wasn’t so raw.
Now, each surgery will have their own policy, but it is worth having that discussion beforehand