Speaking with your doctor is a requirement (& better yet, a doctor familiar with dive medicine suggested by the
Diver's Alert Network).
But from personal experience, I can tell you that I've been diving with 2 herniated discs and sciatica. It really depends upon how you are treating your back, how you are strengthening your back/core & the type of diving you are doing.
I do not use pain killers as way too many people become addicts due to back pain pills. This means that in my case, there are no contraindications to diving because of medication. I do receive occasional lumbar epidurals which have helped tremendously. (Done in an hospital guided under fluroscopy to ensure exact targeting instead of the guessing game that some doctors do in their office.)
I was actively involved in physical therapy & continue to do daily exercises to strengthen my core muscles & support my spine.
During months where my back feels fine, but not great (e.g., at 90-95% of normal), I will only do easy dives (i.e., not too deep, no current, good visibility, etc.). I do not dive during active flare ups of any kind because it can put me & my buddy at risk.
I have also learned to avoid shore dives & only do boat dives. If conditions allow it, I will hand my weights separately to the crew & then hand over my BCD all while in the water. I reduce the amount of time that I'm standing in my gear...sometimes this means letting everyone else go first while I am seated, sometimes this means making sure I am sitting next to the ladder. I also ask for help moving my gear from the room to the shop & to the boat. Note: This doesn't mean I can't perform any of these functions if needed. It's simply a way to reduce the stress on my back. I also discuss this with the crew ahead of time & tip them well for the extra service.
So yes, from my own experience, it is possible. But don't do it if it puts you or your buddy at risk & do consult a doctor.