I have had some elderly tell me that we may not pray behind a non mahram man in house gatherings. I didn’t know there was such a thing. I thought as long as we are in proper full hijab it does not matter to pray behind a non mahram man. Is it true that we cannot pray behind a non mahram man?

You can pray behind as long as there is either a barrier between you or enough gap (at least 1m) between the places of prostration.