Although you would hear/read both forms, "that" would be correct in your example as a restrictive clause because of the defining and essential nature of the phrase, "revealed a disc herniation".

Student or Learner
I'm not sure whether "revealed a disc herniation" is a restrictive clause or not. I think the first sentence is correct, although I guess the second one could be too.
"The doctor treated me twice a week for two months, but because there was no improvement in my condition I had an MRI done on my back in March that revealed a disc herniation."
"The doctor treated me twice a week for two months, but because there was no improvement in my condition I had an MRI done on my back in March, which revealed a disc herniation."
Thanks.
Although you would hear/read both forms, "that" would be correct in your example as a restrictive clause because of the defining and essential nature of the phrase, "revealed a disc herniation".
Good question. I'd say you could use either. I prefer the first.
Consider:
1. "I had an MRI scan which revealed a disc herniation."
The 'which' clause refers to the scan.
2. "I had an MRI scan, which revealed a disc herniation."
The 'which' clause refers to the whole of the main clause.
It's easier to determine the type of 'which' clause when used after "the scan"
But after "a scan":
"I finally had a scan that revealed a disc herniation." Restrictive.
"I finally had a scan which revealed a disc herniation." Restrictive.
You might have had previous scans that didn't. 'Finally' refers to having a scan that showed the herniation.
"I finally had a scan, which revealed a disc herniation." Non-restrictive. You only had one scan. 'Finally' refers to having a scan.
I'd be happy to be corrected if I'm wrong.
By the way, note the suggestion about the commas. The 'because' clause is parenthetical. You might recall a thread about a month ago where some posters said they would use a comma both before and after 'but'.
I'm not sure I understood your explanation.
"I had an MRI scan which showed a disc herniation."
"I had an MRI scan, which revealed a disc herniation."
I think you're saying that the first sentence implies that I've had more than one MRI scan done, whereas the second one doesn't. Is that right?
I take it from your remarks about the commas that my punctuation of the sentence "The doctor treated me twice a week for two months, but because there was no improvement in my condition I had an MRI done on my back in March that revealed a disc herniation." isn't incorrect; your punctuation is simply an alternative.
Also, I'm not sure what's the consequence of the fact that the "because" clause is parenthetical.
Thanks a lot.