training a two year old while co parenting?

I have a 2 and a half year old step daughter. We look after her 3 and a half days a week. So she spends half her time at ours and the other at her mothers. We have a small bungalow and she has her own room right beside our room. We've always let her fall asleep in our bed and when she's asleep just put her into her own bed. She normally would then sleep though the night, however the odd time she would come in and sleep in bed with us if she woke up. However we're training her into falling asleep in her own bed now as I'm due in 9 weeks, and it isn't fair to have her woken up by the baby etc. Tonight was the first night and although we got her to sleep within an hour we both felt like the worst parents in the world. She just kept screaming 'take me back to mamas house' and my heart was breaking! The problem is her mother has always let her sleep in her bed since she was born. She has no room for her and never even used her cot when she was a baby so she is use to sleeping with her mother all the time when she's there. I suppose my question is.... will it be possible to train her into sleeping in her own bed if she just goes back to her mothers and sleeps with her... like will she learn if the cycle keeps getting broken? And also does anyone have any tips?