As a native speaker, I understand it more easily as an ellipsis than as an appositive. However, both interpretations work.
Replacing the comma with a coordinating conjunction yields a sentence that is easy to describe in traditional grammar.
- Hassan speaks Cantonese but not Mandarin.
This version of the sentence has a subject, a verb, and a compound direct object. The compound includes one language and excludes another. The word "but" joins the two elements of the compound phrase and presents an expectation of contrast. The word "not" fulfills that expectation.
Instead of the word "but", the original version has a comma. I would say that the ellipsis occurs at the comma, rather than after it, since I would replace the comma with the elliptical conjunction.
The sentence can be understood by considering "not Mandarin" as an appositive to "Cantonese". Hassan speaks some language. That language is Cantonese. That language is not Mandarin. We can consider the separate phrases "Cantonese" and "not Mandarin" to both refer to the same thing -- a language that Hassan speaks. Under this interpretation, "Cantonese" is the direct object of "speaks", and "not Mandarin" is an alternate reference to the same direct object.
These two different grammatical interpretations both result in the same overall meaning. Each interpretation is sound and supportable.
Since this sentence is presented without context and since the meaning of the sentence remains the same under either interpretation, I see no reason to prefer one interpretation over the other. Feel free to choose whichever you find more convenient.