That's just because you really have to go to the toilet, your stomach is uncomfortable and you feel strange, so you show your feelings in some form in your dream, which is the feeling of seeing fire in your dream.
I can assure you that lying down and sleeping after diarrhea will never have such a dream.
This is the same as "In cold weather, if you expose your feet outside the quilt, you will dream that you are standing in the water". This is a fact.