It is true that "English native speakers use the definite article in front of a noun when they believe the hearer/reader knows exactly what they are referring to". For example: I went to a party last night. The party was boring, but I enjoyed the fireworks.
In this case the definite article in the second sentence is being used to refer back to the party introduced in the first sentence. This type of reference is called anaphoric.
But the definite article can also be used as a forward-looking (or cataphoric) reference. And this is how it is being used in the Harry Potter text.
This passage from Discourse Analysis For Language Teachers (p42) has the following explanation:
Forward-looking or cataphoric reference often involves pronouns but it
can involve other reference items too, such as the definite article.
The author cites two examples from Newsweek:
... which underline the most characteristic function of cataphoric
reference: to engage and hold the reader's attention with a 'read on
and find out' message. In news stories and literature, examples of
cataphoric reference are often found in the opening sentences of the
The definite article in "the narrow, moonlit lane" has a similar function, namely to entice us to read on and discover the exact setting of this particular lane. Contrast Rowling's sentence with one using articles according to the 'rules' of the web site you refer to:
Two men appeared out of nowhere, a few yards apart in a narrow,
It is clear how very much better Rowling's version is.