In principle, it’s definitely possible, and gender has nothing to do with it. Be careful, though, because some entities (parasites) pose as others and will gladly take some of your sexual energy.
General advice: Make sure you give it to the real thing, and btw, a spirit like Belial, Lucifer etc. will NEVER demand or automatically expect sexual energy from you. Once you make sure you know who you’re dealing with, there’s nothing wrong with offering it, but some spirits won’t be too enthusiastic about it. I would advise against giving it right off the bat, and make sure the entity is cool with it and that you’re not wasting your energy on an impostor.