When Rarity first sees Pinkie Pie in that episode, she knows that it has something to do with a baby. Then, she tells Pinkie she won't judge, implying that it's something about her. So I think she thought that the secret was that Pinkie was pregnant.