Actually many vets will spay females in heat, shelters do it all the time and so do rescues. Not ideal, but it has to be weighed against an ooops litter. There was a member here whose male needed emergency surgery for a broken penis and the female spay-abort. It was only a moment of attention lapse it took to end up in such a situation.
BTW, in Maryland Falls Road Animal Hospital does spay when the animal is in heat and there is an additional charge for the obvious reason. With rescue animals often it is not known that the animal is pregnant or in heat until the surgery.
Obviously, it is better to avoid spaying an animal in heat.