I do have IBS and pass mucus in stool very frequently.
In January-February I had one of my major HA crisis because of the Mucus and Diarrhea I was constantly passing. I was certain I had colon cancer, even tho my doctor made me take blood tests and food allergies. It turned out I had a major allergy to diary, and that's why I was having constant Diarrhea. Plus he diagnosed me with IBS caused by anxiety, thus the mucus. Plus he checked by ultrasound all my organs (except the pancreas cuz he couldn't see it because of too much gas in my stomach) and no evidence of tumors or masses found.
Of course, as always, I left the office not being convinced of his diagnosis. I pushed for a colonoscopy a few weeks after, and it all came back clear. Perfect colon, but spastic (IBS) caused by anxiety.
It's almost certain that what you have is IBS caused by anxiety.
Hope this helps, and trust me I suffered horribly by the doubts you are facing today!