Sure.
There's a variety of effects in which you can simply target a square, including taking a blind swing with a weapon. If you're wrong, the target is invalid and the attack/spell is wasted. Invisibility is simply a condition in which you cannot see the target. It doesn't mean you don't know where it is.
This was in some ways addressed a few years ago in some sage advice discussions on "illegal targeting" and eventually made it into Xanathar's Guide to Everything:
If you cast a spell on someone or something that can’t be affected by the spell, nothing happens to that target, but if you used a spell slot to cast the spell, the slot is still expended. If the spell normally has no effect on a target that succeeds on a saving throw, the invalid target appears to have succeeded on its saving throw, even though it didn’t attempt one (giving no hint that the creature is in fact an invalid target). Otherwise, you perceive that the spell did nothing to the target.
In your case, if the Dispel fails, there'd be no way to tell if it failed because the target wasn't in the square anymore or because the spell check failed (though savvy players can probably puzzle it out).