Yes, although it would depend on exactly what surgery - stomache for example would not really be advisable!!
I would also suggest that it be put off till after the birth or until the baby could survive outside the womb (just in case) if that were possible, or maybe that a more local type of anasthetic be used if possible.