The writer is wrong, I don’t know if your friend is a real Guangdong native, “我顶你个肺！” (“I hit your lung”) is a pretty common phrase, you can use it as an expression of anger, or just something on the side, it’s not big deal saying it to friends. Don’t worry – in normal circumstances “我顶你个肺！” definitely has no pornographic association. Now to turn to the meaning to “顶!” (“hit!”).
When we say a person is being difficult, you can say they’re “顶心杉” (“hit/block heart fir”), like having a large fir tree blocking your heart, it’s obviously painful. Blocking both the heart and the lung will make it hard to breathe, so it’s like being frustrated, and thus, you can say that person is deliberately “顶心顶肺” (“block heart block lung”) you.
For example: bastard’s always 顶心顶肺 (block heart block lung)!
So it somehow evolves into “顶你个肺” (“hit/block your lung”), meaning that the person is driving you nutes. Then it became a general word for an emotional outburst, without the cursing connotation. Sometimes you just use the abbreviated form, “顶~”, even saying this though is not very elegant (or polite).