The question is, why will she have it to hand? She's not going to be told it when she really wants it, because she will be isolated. But that's just about at the story climax. There are plenty of situations where a sage older woman might advise a silly young one. It could go in the first chapter, perhaps, but it does not have to; it might be discordant there, in that court where courtship is considered one of a courtier's necessary arts. The Fastness would have less need for it, perhaps, but they would be more likely to say it whenever needed.
Then there's the question of whether it's addressed to the heroine or merely said in her hearing. Either's possible; she does spend a fair amount of time being silly in love. Or it could be addressed to someone else, and then the person points out to her that she may want to remember that too. (She will, of course, dismiss it out of hand at that point.)
Ah, the support structure you find you need for the story, but which you never thought of putting in when it was need. Lucky that fictional castles can be picked up so you can plop a proper foundation under them.