I'm so sorry.

It's obvious you love your pup so much.
Spaying isn't something that needs to be thought about right now. This problem has to be fixed. I'd worry about the spay later...
In most states you do not need a referral to see a specialist. You can (and should) just go. If the specialist wants to wait to repair it, they will probably put on on some more drugs to try and keep her comfortable.
When she gets diarrhea from the lactulose, is she still in pain? the dose can be adjusted.