Aside from the songs of mourning, all her songs are songs of betrayed love. It is hard to avoid the thought that Hamlet has seduced and abandoned her. When she returns, she has gathered herbs. The symbolic meaning of rue is, of course, regret. Ophelia has much to rue, but the symbolic meaning is not the only one.
Herbal abortifacients tend to be mild poisons.
The idea is that you poison yourself to the point where your body decides it's too sick to support the growing embryo or fetus, and rejects it. Rue, while toxic, would not be used as a poison, since it is not a pleasant way to go. Presumably Shakespeare would have given Ophelia hemlock if she had intended to poison herself. A girl who has been seduced and abandoned need fear nothing but a broken heart, provided there is no evidence of her shame. But if she is pregnant, then there is no way to hide what she has done, unless she can abort the child, or kill herself.