You'd have to ask the particular vet that's doing the surgery what their policy is on pregnant spays.

Some will do them anytime but charge extra (takes longer and is more of a pain for the vet to do).

Some will do them and charge extra but only until a certain point in the pregnancy then they refuse to do them after that time.

Some vets outright refuse to do them at all. It would totally depend on what this vets policy is.