Is it fine to exclude an email salutation for short messages?
An important thing to note here is that often these dropped headers don't happen because the email is merely short, but usually because the email chain starts to approximate a conversation, i.e. a quick succession of short replies. So the formalities shift from those of writing letters to those of talking in person. So maybe take some cues from there.
In particular, even if it is short, not starting the first message with some greeting would be a bit impolite. The same is true if some time has passed between messages. (You'd greet somebody if you meet them again, even if you just met them yesterday and didn't talk to anyone in between) But a quick ABAB-exchange within a few minutes doesn't really warrant repeated greetings.
And of course, as mentioned in the other answer, when in doubt, just err on the formal side.
In my experience, it should be fine to drop the salutation given that the other person has done so before you in that same chain. But if in doubt then err on the more formal side. It's always a good idea to emulate the email style of the other person in a one-on-one chain (unless you have some reason for wanting to maintain formality).
I usually find it's good to start and end formally, but for little in-between messages that are around one line and easy to answer it's fine to be informal. Unless the person is really arrogant, they won't find it disrespectful if you do this (especially if they've done it first), although it depends a bit on your relationship to them. Maybe something like this:
You: Dear Prof X, can you please tell me about whatever. Regards, Infinitus.
Prof: Dear Infinitus, here's some information, Signed, X
You: Is that A or B?
Prof: A.
You: Thank you, I'll get on it. Regards, Infinitus.