Does this one work?

/cast [nomod, target=player] Dispel Magic; Dispel Magic

I'm assuming, without a mod key, which could read [nomod:shift] if you prefer, the macro will cast at your own toon (that's the [target=player] part), but when the first argument fails, ie it is being cast with the mod, then the Dispel Magic is cast normally - which means at whatever you're currently targeting.