While he did use magic in front of a muggle, it was his cousin who already knows he's a wizard. The rule was created to prevent wizards to expose themselves (and therefore, every wizard in the world) to strangers. If DUDLEY wanted to expose him, he would had done it years before.
This is kinda where the story became a little political about things.
After Harry returned from the graveyard with Cedris's corpse and discovered Barty Jr's involvement with and declaration of Voldemort's return the ministry immediately got him a Dementor's Kiss. Sounds a lot like silencing the witness, doesn't it? And with a prime witness the enemy PoW gone all that's left would be the star witness and his advocates. Hence the smearing procedures begun, writing Dumbledore as a madman, Sirius a scapegoat, and once Harry's removed there'd be none left to warn about Voldemort's returning. Since Dementors are non-visible to mortal eyes they would assume any use of magic(even those in self-defence) can be used as an excuse of "violation of law" conviction, thus removing all credibility to Harry's claims...
It's quite a brilliant plan, actually, now to think of it. Except they failed to put ONE variation into the mix: Arabella Figg. And that became the first domino that led to Fudge's removal.
After Harry returned from the graveyard with Cedris's corpse and discovered Barty Jr's involvement with and declaration of Voldemort's return the ministry immediately got him a Dementor's Kiss. Sounds a lot like silencing the witness, doesn't it? And with a prime witness the enemy PoW gone all that's left would be the star witness and his advocates. Hence the smearing procedures begun, writing Dumbledore as a madman, Sirius a scapegoat, and once Harry's removed there'd be none left to warn about Voldemort's returning. Since Dementors are non-visible to mortal eyes they would assume any use of magic(even those in self-defence) can be used as an excuse of "violation of law" conviction, thus removing all credibility to Harry's claims..