From the what is presented below and just from a playability and common sense point of view, it is my opinion that it is the second case considered below that should be applied to the case of Death Ward and the Body Thief ability: the Death Ward prevents the creatures brain from being devoured and the Body Thief ability fails.
Death Ward (PHB p.230)
The first time the target would drop to 0 hit points as a result of taking damage, the target instead drops to 1 hit point, and the spell ends.
If the spell is still in effect when the target is subjected to an effect that would kill it instantaneously without dealing damage, that effect is instead negated against the target, and the spell ends.
Intellect Devourer Body Thief (PHB p.191)
If it wins the contest, the intellect devourer magically consumes the target's brain, teleports into the target's skull, and takes control of the target's body.
This does not on first consideration meet any of the conditions for Death Ward to trigger.
If the host body drops to 0 hit points, the intellect devourer must leave it.
This would trigger the Death Ward's effect and as the body drops to 1 HP instead of 0 HP then there isn't even an argument about which happens first. The body never reaches 0 HPs, so the Intellect Devourer does not have to leave and the Death Ward ends.
By spending 5 feet of its movement, the intellect devourer can voluntarily leave the body, teleporting to the nearest unoccupied space within 5 feet of it. The body then dies, unless its brain is restored within 1 round .
The body does not die until 1 round after the Intellect Devourer leaves it so Death Ward would not prevent it leaving. So the real sticking point with this is what happens when the body dies? This is the order of events:
- Intellect Devourer leaves host body
- Host body continues to live for 1 round
- Host body dies from no brain
- Death Ward triggers and protects it from dying from this "effect" and the spell ends
- Host body still has no brain, and we can assume it continues to live for one round, as above
- Host body dies from no brain
So considering only the above the effect of Death Ward is that the Host Body lives for one extra round.
However, it is arguable that the creature dies at the point it's brain is devoured, not at the point it's body dies after being left by the Intellect Devourer that inhabited it.
The closest thing for RAW on this matter is the spell Magic Jar (PHB p.257) where the rules on what happens in the various permutations around the spell ending due to the container being destroyed includes this:
If your body is more than 100 feet away from you or if your body is dead when you attempt to return to it, you die.
i.e. if your body is alive but more than 100 feet away you die, presumably because your spirit or soul or whatever dies, and so death is not dependant on the body being dead.
This is supported again with the next line from the spell:
If another creature’s soul is in the container when it is destroyed, the creature’s soul returns to its body if the body is alive and within 100 feet. Otherwise, that creature dies.
i.e. the other creature dies in this scenario, even when it's body is alive.
This means that, unless you do not consider (given the rules for Magic Jar above) it is at the point the brain is devoured that the creature dies and not when it's body dies, then a Death Ward would trigger at the point the brain would be destroyed and prevents that effect, as it would cause instantaneous death. The Body Thief ability fails and the Death Ward ends.