Why is necessary the "on" at the end?
On is the Verb. Finnish doesn't have a verb for 'to have' so they use the noun hän + -llä + the verb on. Literally means 'on he there is'.
How come you can't say, "Millainen poni onko hänella?"
You already have a question word (millainen) so adding the question marker (-ko/-kö) is unnecessary and it makes the sentence incorrect.
^This. And remember also the vowel harmony: hänellä. In this sentence it also sounds much more natural to have the verb (on) after the subject (hänellä).