It sounds like the arrest isn't because of any official act of the judge, but rather over them either not telling the ICE agents where the person was or giving them the wrong information about their location.
There are some pretty broad laws about "you can't lie to the feds", but I think the unusual thing here is that they're using them against a reasonably politically-connected person who's not their main target. (They're normally akin to the "we got Al Capone for tax evasion" situation -- someone they were going after, where they couldn't prove the main crime, but they could prove that they lied about other details.)
EDIT: since I wrote that 15 minutes ago, the article has been updated with more details about what the judge did:
> ICE agents arrived in the judge’s courtroom last Friday during a pre-trial hearing for Eduardo Flores Ruiz, a 30-year-old Mexican national who is facing misdemeanor battery charges in Wisconsin.
> Dugan asked the agents to leave and speak to the circuit court’s chief judge, the Journal Sentinel reported. By the time they returned, Flores Ruiz had left.
I.e. the ICE agents showed up in the middle of a court proceeding, and the judge said they'd need to get permission from the chief judge before they could interrupt proceedings. The judge then didn't stop the defendant from leaving once the proceeding was done.
EDIT 2: the Milwaukee Journal-Sentinel article says:
> Sources say Dugan didn't hide the defendant and his attorney in a jury deliberation room, as other media have said. Rather, sources said, when ICE officials left to talk with the chief judge on the same floor, Dugan took the pair to a side door in the courtroom, directed them down a private hallway and into the public area on the 6th floor.
Which is an escalation above the former "didn't stop them", admittedly, but I'm not sure how it gets to "misdirection".