Hello. One of the biggest things with metacam is that if the pet is vomiting the drug needs to be stopped as this can actually be the cause of the vomiting and it can cause ulcers in susceptible animals.
I would not continue to give this medication and contact your doctor about trying a different type of pain relief like tramadol and no further anti inflammatories for a least until the surgery. In his case I would avoid NSAIDS even at that time and stay with tramadol.
Yes, it is possible that the anesthesia has caused some residual issues that may resolve over time but due to the seriousness of what NSAIDS can cause I would err on the side of caution and stop that medication. Contact your vet for other options.