I have never done this, but when I have helped people on an extraordinary scale (say 10-20 hours of work that is not remotely in my job description) they might say that they will stand me lunch or a beer. I have accepted only if we are already in the habit of eating lunch together in the cafeteria or a fast casual place around the office. Most of the time the other party has been female (most are analysts I have previously mentored but are now nominally peers, and all of them have been female). I’ve never gotten the impression that anyone was creeped out by the offer or acceptance.
If I’m expecting a private three course lunch in Brasserie Le Coze with someone of the opposite sex with whom I never or rarely lunch with otherwise or cocktails at a rooftop lounge after work where no other colleagues are, that’s all kinds of sketchy.