Was this just a really bad joke?

Last night I was with some friends walking back from the pub (nobody was drunk so can't be that), two girls and three guys, and we were just chatting before heading in different directions. We were talking about this women's self defence course that is starting soon and one of the guys said his brother used to work in a prison and apparently he'd seen a guy get out of rape by pretending to go along with it and offer a bj then bit the guy's dick off so he was in too much pain to do anything and had to go to hospital so got caught. We all just said something about it sounding hella painful but whether or not someone could ever use it would depend on the context and most people would be in shock and panicking too much to do it. The guy who said it then said "true but I think it's the type of thing *my name* would do" it was really awkward for a second because nobody really knew how to react and I just said "wait, what?!" before one of the girls changed the topic.

I'm just confused as to if it was supposed to be some sort of joke or something cause I found it funny in retrospect but only because it was such a weird thing to say and I don't know if I should be offended or not?! If I was an incredibly flirty person then maybe I'd understand him trying to joke about me being able to act along with it but I'm really not openly flirty at all. I'm also sure that if I ever was in the position I would either freeze up or just attack the guy non-stop and hope I didn't end up dead tbh, offering a bj would be the last thing on my mind.

I'm just confused really. I think it might have been an attempted joke but I can never see anything rape-related as funny so maybe that's why it didn't work? What would you think if someone said that about you?