It’s a “restrictive appositive,” which are subject to some important differences with respect to how you punctuate them. The reading you suggest would instead be the case if you had a non-restrictive appositive, but those are always set off with punctuation on either side (usually a pair of commas, but dashes and colons are not uncommon either). And you wouldn’t use a non-restrictive appositive on something in the possessive; there just isn’t a good place to put the ’s if you do (some construction with of would be a native speaker’s choice if they needed both the possessive and a non-restrictive appositive).
Instead, Dobby the house-elf is being used as a name here, with the house-elf being a particular, common form of restrictive appositive, that is, an epithet:
ep·i·thet | \ˈe-pə-ˌthet also -thət \
Definition of epithet
- a : a characterizing word or phrase accompanying or occurring in place of the name of a person or thing
(epithet, Merriam-Webster Dictionary)
So here we have Dobby, his name, plus the house-elf as an epithet, and grammatically the entire thing, Dobby the house-elf, is being used as a name. As it is a name, the possessive is clear here: ’s goes on to the end of the entire name, that is, Dobby the house-elf’s.
Note that the house-elf is lower-cased. This indicates that the epithet is being used here, in this case, but it’s not like everyone goes around calling him Dobby the house-elf. When an epithet becomes very common, and how many people refer to someone, then it can become more properly part of their name, and get capitalized. Consider Eric the Red,1 Charles the Great,2 or Vlad the Impaler.3
Famous Viking explorer, who founded the first settlement in Greenland and whose son, Leif Ericson, was actually the first European to reach continental America. The Red likely refers to his hair color.
Better known as Charlemagne, the first Holy Roman Emperor. The Great refers to his importance and the significance of his deeds.
Prince Vlad III of Wallachia, also known as Vlad Dracula, after whom Bram Stoker named a vampire. The Impaler refers to his notorious penchant for impaling those he would have executed.
In order to achieve the sense that Dobby is the house-elf’s owner, you would need a comma to break things up, to make it a non-restrictive appositive. Consider these variations:
Dobby the house-elf’s former owner
Here Dobby the house-elf is a name, with the house-elf as an epithet, a restrictive appositive. It is unambiguous that Dobby is the house-elf who was formerly owned.
Dobby, the house-elf’s former owner,
Now the house-elf’s former owner actually is a non-restrictive appositive, and it’s unambiguous that Dobby is the former owner of some house-elf previously discussed or otherwise indicated by context (which could not be Dobby himself, the house-elf here would have to be some other house-elf).
former owner of Dobby, the house-elf,
Here we have another non-restrictive appositive, this time the house-elf. The meaning of this is the same as your original proposal, that is, Dobby is unambiguously the house-elf who was formerly owned. But we had to change the word order around and introduce of to get the possession to work, because there would be no way to add a ’s to Dobby, the house-elf, to achieve this meaning.
Also, remember that anyone reading that sentence in the middle of the novel knows very well who Dobby is, and who the Malfoys are. You ask what native English speakers think of this usage of the appositive, but most native English speakers would probably think “what’s an ‘appositive’ again?” The terminology is an attempt to characterize the patterns and precedents English speakers recognize and use in their speech, but writing or speech isn’t right or wrong based on how well it matches those characterizations—it’s right or wrong based on how well it matches the patterns and precedents recognized by their audience (and it is rarely conscious recognition), and Rowling’s audience here is people who have been reading her novel and are familiar with these characters. If the audience gets it, but the terminology says it’s wrong, then it is the terminology that is off, failing to fully capturing the breadth and variety of the English language, not the speaker or author.