Extended harmony is anything beyond the seventh in a triadic chord. This includes 9ths, 11ths, and 13ths. Labeled G9, G11, and G13 (for dominant chords).
If a non-chord tone doesn’t fit within our given possibilities, it’s most likely an extention. Your options for non-chord tones are:
If you have what looks like a G7, and you see an A, but it doesn’t fit into any of these non-chord tone motion options, you have a G9.
What are the differences between these chords?
A V9 chord is the combination of a V7 and a G#%7. In A, the lower 4 notes are E,G#,B,D (V7). The upper 4 notes are G#,B,D,F#.
ALL OF THIS BEING SAID, the ninth chord is a last resort. It is rare in the type of music that this system of tonal analysis was created to analyze. Extentions are used mainly for jazz, which is far out of our fixed system of analysis.
Whether you analyze a tone as an extention or non-chord tone is up to how you hear it. Just make sure you label the tone to match what your analysis says.
In the case of a b9, (in A minor) the chord symbol would be a E7(b9). In the roman numeral analysis you would write V9, because the b9 is naturally occuring in the key. It is altered in the parallel major (how we label dominant extentions) so it is labelled as E7(b9) in chord symbols.