Yes, stress can certainly cause it. From your description, it sounds most likely to me.
Family crises always affect my gut. One of the first things that happen is that I lose my appetite, typically for three days. At the same time, I don’t dare get far from the bathroom. In a recent two-year period, I lost 60 pounds to stress and anxiety, and believe me, that’s not how you want to do it.
A few years ago in December I actually went to the ER thinking I was having a heart attack. No, it was intestinal response to out-of-control stress.
For my husband, he says these things tie his stomach in thorny knots. That’s his version of the same thing.
My first step with heartburn is to reach for Rolaids. I also immediately start avoiding acids in my diet. And anything else that helps to reduce stress is good: meditation, Serenity Prayer, vigorous walks, talk therapy, total distraction and absorption in something, escapism, denial. I don’t recommend the latter as a general principle, but sometimes you just need a break.
I’m so sorry for your distress, and as you may know, I can empathize deeply.