The incorrect way
So, they say you need long nails if you don't plan to use a guitar pick.
They also say that if you anchor the pinkie finger of your right hand in the body of the guitar, you limit the range of movement greatly and won't be able to play complex riffs.
Well, Mark Knopfler plays without a guitar pick, keep his nails short and anchors not one, but two fingers.
And he plays one of the greatest guitar riffs of all time (one that people think they play correctly, but, as Paul Davids explains, most of them do it wrong).
Finding your own way is always the right way of doing it.