Prosecutor? No need. How about defense counsel? Nah, they can represent themselves.
Meet Judge Louis DiLeo. Back in 2010, in the Linden, New Jersey, municipal court, DiLeo held a "trial" consisting of himself as the judge and prosecutor, the two defendants representing themselves (after denying their request for a public defender), and the police witness, who cross-examined them.
Unsurprisingly, the two convictions were later reversed, Judge DiLeo was reprimanded, and last week, the Third Circuit upheld the district court's holding that he had lost his judicial immunity by going all Judge Dredd on the parties.