DISPEL MAGIC
Choose one creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends.
For each spell of 4th level or higher on the target. make an ability check using your spellcasting ability.
The DC equals 10 + the spell's level. On a successful check, the spell ends.
RAW it only works on spells, so unless the magic effect is something like a wall of force, symbol, or other spell you can't dispel it.
You need a spell level to set the DC of the spellcasting ability check, so obviously again it needs to be a spell.
Now saying all of that I don't know many DM's who wouldn't allow dispel magic to work on non-spell things and just set a DC.