On the board there are only 2 units: my Irelia Fervent, and my opponent's Irelia Fervent. Can I play Defiant Dance giving +2 to my Irelia, then refusing to pay the Deflect cost on the opponent's one so no one gets the -2?

No, you cannot do that.

According to Rule 353.2.a.2, the cost imposed by the Deflect keyword is a Mandatory Additional Cost. You must pay this cost in full to successfully play the spell.

If you choose to target an opponent's unit that has Deflect, you are required to pay the additional cost to play the spell. You cannot "refuse" to pay a mandatory cost while still playing the spell; if you do not pay the cost, the spell cannot be played at all. Furthermore, you cannot choose to play a spell and then opt out of one of its effects (like the -2 [M] reduction) while keeping the others. The spell resolves as written, applying both effects to the chosen targets.