Recently i saw in a Namaz e Janaza that Ladies were standing behind Men and started praying Namaze Janaza just behind without any partition or something. When asked they said we can recite it as per ruling or law.

Yes, they can.
There is no problem.