Trifle are you saying this 40 something person needs to go to a party?
"I think that's self-explanatory."
I don't. ANY man could say he needs to be around women, he likes them, loves them, associates with them, doesn't like men, doesn't like their company. So any man could argue that the female only book group, or school, or swim club should be open to him.
But if I as a white woman wanted to crash the local Pakistani women's association or take part in the local transgender swimming club, I would not be welcome (I would expect) and of course, I would not attempt to join such a group. My presence in the group, expecting to have things explained to me, expecting to do as I pleased as a non-Pakistani, or non-trans person, may well cause difficulties for the others in the group.
Not inviting or including everyone in everything is our right as individuals. It's not the right of companies or universities etc to turn away people because they are Pakistani or trans or white or whatever. But within social and friendship groups we can choose parameters.
As I said before if a forty something mum or aunt wished to come to a young person's hens' do, or the future MIL, we would not expect the bride-to-be to include them even if not doing so caused offence!