Looking at it without context "Ez az alma, nem az" could mean "This apple, not that one." However, I'm struggling to come up with a context where it would used in this exact form, with this meaning.
"Az az alma az, amit akartál?" (Is that apple the one you wanted?) "Ez az alma az, nem az." (This apple is it, not that one.)
"Ezt az almát akartad?" (Did you want this apple?) "Ezt az almát (akartam), nem azt." ((I wanted) this apple, not that one.)