What Harry should’ve asked isn’t where the experience was taking place but whether the Dumbledore he was talking to was the model of Dumbledore in his head, which only knows things that Harry knows, or enough of the actual Dumbledore to know things that Harry doesn’t know. That is, what’s relevant isn’t the location of the experience but the source of the information feeding into that experience. That would also be the relevant criterion for distinguishing between, for example, a message from God and a hallucination.
What Harry should’ve asked isn’t where the experience was taking place but whether the Dumbledore he was talking to was the model of Dumbledore in his head, which only knows things that Harry knows, or enough of the actual Dumbledore to know things that Harry doesn’t know. That is, what’s relevant isn’t the location of the experience but the source of the information feeding into that experience. That would also be the relevant criterion for distinguishing between, for example, a message from God and a hallucination.