The author is describing an imaginary scene. In actuality, there is no cresting wave lit by the physical moon. He imagines one of the many possible imaginary waves, lit by one of the many possible imaginary moons. Yes, with reference to the Solar System, we refer to "the" sun. But, any arbitrary one of the clestial bodies that are the stars of the Milky Way Galaxy may be called "a sun."
The point is that "the" refers to a specific element in a set or all the elements of a specific set whereas "a" refers to any single element of that set.
Many planets have moons. Some have multiple moons; others like the earth have but one. We say "the moon is full tonight" because implicitly we are defining a class consisting of the earth's moon, which "class" has only one element. "A moon with active volcanoes is rare in the solar system" recognizes that there is more than one moon in the solar system. Similar constructions would apply to an unspecified moon in the Milky Way galaxy or the universe as a whole.
EDIT: As David Siegel says, the construction is being used here as a literary or rhetorical device. To determine the exact effect or effects the author intended might require analysis of the entire work. I can think of at least two possibilities, which are not mutually exclusive.
One relates to memories of an event, and memories differ in details, emotional tone, etc. This is a reference to a memory of an event, and an event that was emotionally meaningful may be remembered many times. So to use the indefinite article implies that the memory mentioned as occurring at the time that "I thought" was merely one of "my" memories of the event and that those multiple recollections emphasize the emotional importance of the event.
A different possible effect relates to generalization. The event recollected was unique. It happened on a particular night to particular people. So the definite article could be used: "the cresting wave ... lit by the moon ... the band of yelping students." If, however, the author wants to imply that the emotional significance of this event is not unique and that the recollection of other events may trigger the same emotional effect in others, then a subtle way to generalize is to use the indefinite article.
My point, however, was not to attempt literary analysis of a book I have not read. I should of course have referenced that this is an example of a rhetorical device. But my point was that the rhetorical device merely utilizes the "rules" for use of the definite and indefinite articles. It is not just a literary device.
The indefinite article implies that the specific identity does not matter and that there is more than one. We say "the moon" when we are talking about the earth's moon as a unique physical object, but we may say "a full moon" when we are talking about the recurring appearance of that singular physical object. The "rule" you referenced about celestial objects does not exist. The rule is about implicit framing of sets.
Now this takes me back to the literary effect of your example. Here the reference is to a unique event, but the use of the indefinite article affects our perception. Waves are common; the moon appears millennium after millennium, and bands of students have been jeering probably since the first teacher gathered the very first group of students. But "I thought" about a unique concatenation of those banalities. The normal rules of grammar are stretched; the unique event concatenates elements, none of which is even rare; the unique event may elicit an emotion that is common; the unique event is remembered differently at different times and by different people. The uniqueness of the event is transcended by the use of the indefinite article.