Yes, those are the rules as written.
The PHB (p. 198) does state that the attacker can just choose to knock their target out if they drop them to 0 hit points:
When an attack reduces a creature to 0 hit points with a melee attack, the attacker can knock the creature out. The attacker can make this choice the instant the damage is dealt. The creature falls unconscious and is stable.
It also says, immediately preceding that section:
Most DMs have a monster die the instant it drops to 0 hit points, rather than having it fall unconscious and make death saving throws.
Mighty villains and special nonplayer characters are common exceptions; the DM might have them fall unconscious and follow the same rules as player characters.
So the normal way of things is that when a monster/NPC is dropped to 0 HP, they just die, unless the DM or the players specifically would like to keep them alive by knocking them out instead.
Now monsters may have immunity to specific conditions, as described in the MM (pg 8):
Some creatures have vulnerability, resistance, or immunity to certain types of damage. Additionally, some creatures are immune to certain conditions. If a monster is immune to a game effect that isn't considered damage or a condition, it has a special trait.
And as per the PHB again (pg 292), being unconscious is a "condition", which a creature may or may not have immunity to. If it is not listed as being immune to unconsciousness, it is not immune - so it can be knocked out. Some creatures, such as elementals, are specifically listed as being immune to the unconscious condition.
If it helps, you could imagine an unconscious ghost as being so damaged it has become essentially incapacitated and can no longer act or do much of anything but has not quite been utterly obliterated just yet. Remember that enemies knocked unconscious by fights in this way haven't just had a bump on the head and gone to sleep - they're very badly hurt all-round, and reaching 0 hit points is the threshold at which you're just too damaged to function.
Of course, your DM is free to decide whether or not they think ghosts can be disabled in such a manner in their world.