As jwpat7 says, it is grammatically sound, but outside of poetic licence, I'm not sure I would recommend it.
Personally, I'd object to lonely and loner together. Lonely = feeling sad because one is alone, because one seeks company. Whereas you rightly suggest a loner prefers being alone.
You could argue that a loner might be such because they have become accustomed to being alone, and perhaps find it difficult to function alongside others, but in general, I would assume a loner actually prefers to being alone, and thus would unlikely be lonely.
If we are talking of literature, poetry and lyrics, then it's fair game. Otherwise, I'd simplify the phrase...