9.32Melody note may be an extension
Suppose chord is Cmaj7 and melody note D.
Instead of rejecting the chord, you can interpret the sonority as:
Cmaj9
Chord tones:
C E G B
Melody:
D = 9th
So sometimes the melody automatically determines the extension.
This is a major concept for jazz arranging.