I think one can play any note at any time during a song. The only condition is that the note just prior and just after should be in the correct chord/scale. I have heard some pretty good pickers do some amazing things with wierd notes and off times.
I think I learned "Wildwood Flower" Carter Style and realized that I could skip doing chords if I'd play a two or three note between chords riff. After that I just got lazy and began playing a lot of notes instead of trying to get to all of those confusing chords - JUST joking!! But sort of serious.
The tunes come with practice so don't try to do it all at once. Get a clean melody that fits your impression of what the melody line is. Not everyone has the same sequencing of notes for the same song. It'll come.
This is a good thread -