From the section on Surprise in the PHB:
The GM determines who might be surprised. If neither side tries to be stealthy, they automatically notice each other. Otherwise, the GM compares the Dexterity (Stealth) checks of anyone Hiding with the passive Wisdom (Perception) score of each creature on the opposing side. Any character or monster that doesn’t notice a threat is surprised at the start of the encounter.
I often see the highlighted part extended to mean "A creature that is generally aware of some kind of threat can not be surprised" (see here or here) because of the use of the indefinite article. Is there any support for this interpretation of the rules? Using this interpretation, a guard who was warned ahead of time that enemies are approaching (but has no further information about time, direction, appearance...) could never be surprised by anything, as she is generally aware of a threat. This seems nonsensical to me. Is there any resolution to this problem apart from "it's up to the GM"? Maybe at least a good rule of thumb for what constitutes as "a sufficiently non-general sense of a threat" that keeps a creature from being surprised.
One particular example I'm interested in:
Let's say a Rogue is hiding behind an open door and he wants to lure a creature into the room by producing some kind of sound from inside the room via the Minor Illusion cantrip. The creature is alarmed by the unexpected sound and goes straight to its source, entering the room and exposing its back to the Rogue who, unnoticed by the creature, prepares to attack it.
Is the creature surprised? It is aware that something is not right (a vague sense of a threat), but it is not aware of the Rogue (who is the actual threat).