Poop smells like onion

Hi. I’m wondering If IBS can cause this onion-ish smell in stool. I just had a quite large BM. It was a bit flat, but the width is normal. The color is light brown/medium. I don’t see blood or any odd with it except flat stool but I had that before and apparently it’s a sign of IBS. I think I had this oniony smell from my stool. It’s not excessively bad, just has more of an onion/smellier smell than usual. My dad gets this a lot, actually. I heard diarrhea can cause the smell but my stool is formed. My anxiety is acting up again because I read someone’s comment somewhere about how her mom has colon cancer and had blood in her stool which would smell like onion. I still have not gotten diagnosed with IBS yet and last time I went to the doctor was 2 and a half ish months ago. I had this smell before but I read this one comment somewhere and now I’m scared.