There is no reason another pregnant woman should not go near a woman in labor. Labor is not contagious.
That being said, the rush of adrenaline of racing a woman in labor to the hospital could have stimulated contractions in your sister. Think about it--your friend calls and says "take me to the hospital now!" Don't you think your heart would start beating faster and you'd run out of the house as if it were on fire? That causes stress in everyone! And stress can cause contractions. That's why some doctors prefer women in stressful jobs to take early leave when they're about a month from their due dates. Nobody wants a premature birth if it can be prevented.
I think the doctors' words were either misinterpreted or they just said something stupid to give her a reason why it happened. I'm sure she was asking them why it happened. Doctors don't like to say "I don't know."
And maybe that had nothing to do with it at all. I had a friend go into premature labor at about 32 weeks, and after treatment, labor was stopped and she delivered weeks later on her due date. Sometimes it just happens.