The term "Dungeon Master" and the acronym DM both appear in the AD&D PHB. So does the word "referee", which is used strictly synonymously.
This sort of incoherence in the framing of RPG participant roles has a long history,
From the introduction to RuneQuest, second edition (The Chaosium, 1978, 1979, 1980; specific author for this text unknown; game authors are Steve Perrin, Ray Turney, Steve Henderson, and Warren James):
The title of the game, RuneQuest, describes its goal. The player creates one or more characters, known as adventurers, and playes them in various scenarios, designed by a Referee. The Adventurer has the use of combat, magic, and other skills, and treasure. The Referee has the use of assorted monsters, traps, and his own wicked imagination to keep the Adventurer from his goal within the rules of the game. A surviving Adventurer gains experience in fighting, magic, and other skills, as well as money to purchase further training.
Now all that's pretty Gamist stuff of a late 1970s vintage, right? Get this, which follows immediately:
The adventurer progresses in this way until he is so proficient that he comes to the attention of the High Priests, sages, and gods. At this point he has the option to join a Rune Cult. Joining such a cult gives him many advantages, not the least of which is aid from the god of the cult.
Acquiring a Rune by joining such a cult is the goal of the game, for only in gathering a Rune may a character take the next step, up into the ranks of Hero, and perhaps Superhero.
All right, that bit about joining cults still seems kind of Gamist, right? About getting more effective and so on? Great ... except that the GM controls the High Priests and sages. Why would he, whose job was
just stated to be to "keep the Adventurer from his goal," have them recognize the Adventurer in the first place? Either they do, and the GM must abandon the stated goal, or they don't, and that whole paragraph becomes gibberish.
At least in the case of classic D&D, I think the way out of the incoherence is to identify two distinct roles for the DM/referee:
s/he designs the "arena" for play - the dungeon or wilderness map-and-key, associated random encounter tables, etc; and then
s/he is a neutral referee in the free kriegsspiel style.
That division of labour breaks down basically as soon as the way play takes place requires the DM/referee not just to adjudicate established fiction but to make up new fiction that serves some sort of adversary role; which is to say any time play breaks away from map-and-key adjudication. Urban adventuring and any sort of subtle social interaction are probably the most obvious ways where this happens.
EDIT: Classic Traveller (1st published 1977) calls the GM the referee, although it anticipated plenty of urban adventuring and subtle social interaction right out of the gate! And more generally anticipates that the referee will establish adversity during the course of play and not just in advance of it. So in that case "referee" was probably a misnomer from the outset. Though I still use it when talking about GMing Traveller.