This happens sometimes. Nobody can remember everything.
Just to cover yourself, so you can feel good about posting and be ready should you be questioned about it, write the poem, then Google it several ways, i.e, by the title, by several different lines and even a few key words. At least then you will have a level of comfort about posting.
Should anyone then say something about it and have proof, you can at least say you tried and could find nothing.
But probably more importantly, if someone does question it and offer proof, be gracious and don't become defensive. It all comes down to just being honest and admitting mistakes. I don't think anyone would be angry or bite your head off for making a mistake. It's when we become defensive or argumentative that these things get nasty.
You've already shown good concern by posting this question, just do your best to check it out and there should be no flack from anyone.