Third Person (Omniscient), First Person (Peripheral)
It's hard to completely pin down this narrator, right? Sometimes he's a voice. Sometimes he's a real guy. Sometimes he is even in the story itself! Maybe it would be helpful to just list all of the different ways Thackeray makes his voice appear.
1. Straight up all-knowing disembodiment. This is the type of narrator we all know best. He tells us what's happening, what everyone is thinking and feeling, and what everything and everyone looks like. This is the voice that opens the novel and describes that first set piece of Becky and Amelia at school. One is silly, one is clever, their headmistress is an old gasbag, and the narrator is in command of all knowledge (Chapter 1).
2. Patronizing condescension. This is when the narrator suddenly lectures readers or decides that we can't handle the truth. Sometimes it's cynical aside ("I do not mean to say that all females are [like Amelia]. My dear Miss Bullock, I do not think your heart would break in this way. You are a strong-minded young woman with proper principles"(18.18)). Other times it's a taunt that, although the narrator could show us something, he won't ("Have we a right to repeat or to overhear her prayers? These, brother, are secrets, and out of the domain of Vanity Fair, in which our story lies" (26.14)). And sometimes it's just bragging about his level of access ("I know where she kept that packet she had – and can steal in and out of her chamber like Iachimo--like Iachimo? No – that is a bad part. I will only act Moonshine, and peep harmless into the bed where faith and beauty and innocence lie dreaming" (12.22)).
3. Puppeteering. This is the device that opens and closes the novel (check out "What's Up With the Ending?"), where the narrator says that he's setting up a puppet theater to show us a little play we might like.
4. Loss of narrative privilege. Sometimes the narrator busts out with the crazy-sounding information that he's not important enough to know what's actually going on with the characters. Say what? This is how he slowly transforms himself from a third-person voice to a random first-person observer. ("To us, from the outside, gazing over the policeman's shoulders at the bewildering beauties as they pass into Court or ball, they may seem beings of unearthly splendour and in the enjoyment of an exquisite happiness by us unattainable" (51.25).)
5. Confiding acquaintanceship. At the end, we get the weirdest manifestation of the narrator ever. Turns out he is a real person? And he actually knows Dobbin? And it's from Dobbin that he learned the story of all the people in the book? What on earth? Your guess is as good as ours.