Passing in Front of Someone Who Is Praying
Question

One time, by mistake, I told some women in a prayer room, who wanted to pray but were waiting for some women to pray so they could pass in front of them, I told them that it was okay since it was a prayer room, and we do pass in front of others in the Masjids. 
But I have recently learnt that you can only pass in front of others when the congregation takes place, and otherwise you cannot and the person praying must stop the person from passing or else the person passing is a devil. 
I told a lot of women there this, and I am sincerely sorry for speaking without knowledge and have asked Allah (swt) to forgive me, but I feel guilty for spreading wrong information which they might take to be true, and might even pass on to others!
What can I do, and would the sin of these people come on to me? Can you please also tell me what should one do in a Masjid, where people usually pass by in front of you when you are just praying normally (not in congregation)? Does this apply to the Masjids at Makkah and Madinah also?
Praise be to Allah.Consequence of speaking without knowledge 
You should note – may Allah forgive you – that you have committed a great sin, which is attributing someting to Allah without sure knowledge. This is a sin which Allah mentioned in conjunction with Shirk (ascribing a partner or rival to Allah). Allah says (interpretation of the meaning): “Say (O Muhammad): (But) the things that my Lord has indeed forbidden are immoralities whether committed openly or secretly, sins (of all kinds), unrighteous oppression, joining partners (in worship) with Allah for which He has given no authority, and saying things about Allah of which you have no knowledge.” [Al-A`raf 7:33]
The Prophet (peace and blessings of Allah be upon him) said: “Whoever introduces a good way in Islam which is followed after he dies will have a reward like that of those who did it, without that detracting from their reward in the slightest. Whoever introduces a bad way in Islam which is followed after he dies will have a burden of sin like that of those who did it, without that detracting from their burden in the slightest.” (Narrated by Muslim, 1017, from Jarir ibn ‘Abdullah) 
So you have to repent to Allah and seek His forgiveness for this sin. I ask Allah to bless you with sincere repentance. 
You should also strive to correct your mistake by telling those who heard what you said before without knowledge. 
Passing in front of someone who is praying alone
With regard to the question that you mentioned, if someone wants to pass in front of a person who is praying , one of the following scenarios must apply: 

If he passes in front of the one who is praying , i.e., in the area between the spot where he puts his forehead when he prostrates and where he stands, this is prohibited, and indeed it is a major sin. 

The Prophet (peace and blessings of Allah be upon him) said: “If the one who passes in front of a person who is praying knows what (a burden of sin) he bears, it would be better for him to stand for forty rather than pass in front of him.” Abu Al-Nadar – one of the narrators – said: I do not know whether he said forty days or months or years. (Narrated by Al-Bukhari, 510; Muslim, 507 – from Abu Juhaym (may Allah be pleased with him) 
In this case, it makes no difference whether the person has a Sutrah (object to serve as a screen) or not. 

If he passes in the area that is beyond the place where he prostrates. Two scenarios may apply in this case: 


If the one who is praying has set up a Sutrah . In this case, it is permissible to pass beyond the Sutrah . The Prophet (peace and blessings of Allah be upon him) said: “If any one of you prays, let him face towards something (a Sutrah). If he cannot find anything, then let him set up a stick. If he cannot do that, then let him draw a line, then it will not matter if anyone passes in front of him (beyond that).” (Narrated by Ahmad, 3/15; Ibn Majah, 3063; Ibn Hibban, 2361. Ibn Hajar said in Al-Buloogh, 249: The one who said that the Hadith is inauthentic is not right; rather it is sound.)

Talhah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “If one of you puts something in front of him that is height of the back of a saddle, then let him pray and not worry about anyone who passes beyond that.” (Narrated by Muslim, 499)

 If the one who is praying has not set up a Sutrah, he has no more than the space in which he prostrates. This is the most correct scholarly opinion. It is permissible for the one who wants to pass in front of him to pass beyond the spot where he prostrates. That is because the prohibition mentioned in the Hadith applies to passing in front of the one who is praying, and what is beyond the place where he prostrates is not counted as being in front of the one who is praying.

Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said, after mentioning the differences of scholarly opinion concerning the distance within which the worshipper should stop anyone from passing in front of him: 
"The most correct opinion is that it is the distance between his feet and the place where he prostrates. That is because the one who is praying has no right to anything more than what he needs for his prayer. So he does not have the right to prevent the people from (using space) that which he does not need.” (Al-Sharh Al-Mumti’, 3/340) 
Passing in front of someone who is praying in congregation
All of this has to do with one who is praying alone or is leading others in prayer. If he is a member of a congregation , then the Sutrah of the Imam is the Sutrah for those who are behind him. 
Al-Bukhari (may Allah have mercy on him) said: (Chapter: The Sutrah of the Imam is the Sutrah of those who are behind him). 
Ibn `Abbas said: “Once I came riding a female donkey and had just attained the age of puberty. The Messenger of Allah (peace and blessings of Allah be upon him) was praying at Mina, and there was no wall in front of him. I passed in front of part of the row while they were praying. Then I let the donkey loose to graze and joined the row, and nobody objected to it.” (Narrated by Al-Bukhari, 76; Muslim, 504)  (Al-Mughni, 2/42, 2/46) 
The correct scholarly view is that Makkah and other places are the same because of the general meaning of the evidence. There is nothing to suggest that Makkah is not included in this general meaning. This is the view favoured by Shaykh Ibn ‘Uthaymin. (Al-Sharh Al-Mumti’, 3/342) 
And Allah knows best.