I think maybe your friend is referring to "ma de", which literally means "your mother" but colloquially means "f**k".
Actually, there's a slow, drawn out way to say this, which is "maaaa de", which means "f**k", "s**t"... but honestly, without the "de" (which sounds like "duh"), no one will misinterpret your meaning (or lack of meaning) by simply saying "ma".
I can actually give you a better applied example...
When I first arrived in China, I would often find women to be the more accepting of answering questions from lost foreigners than men, so I would often say: "qing wen", which means "please ask"... which translates to "excuse me, may I ask a question"?
However, if you ask this question to a single woman during the evening, "wen" also means "kiss", so it may sound like "hey, how about a kiss"?
This is the only misunderstanding I've had more than several times before understanding what was going on.
The last experience I've had was complementing others. I often find myself wanting to say "you have a wonderful personality", or "your personality. good!" using Chinese grammatical structure.
Personality in Chinese is "ge xing" or "ge shing". However, I often reverse these two characters and say "xing ge" or "shing ge". Unfortunately "xing gan" means "sexy". So if I compliment a woman on her personality in front of her peers, it sometimes sounds like I am saying "I think you... sexy! very nice".
Talk about cringeworthy!
That's my 2 cents...