Sorry, but that’s incorrect.
Look here, esp. Canon 1055 para 2. And here, esp. Canon 1117. Non-Catholic baptised Christians need only to contract marriage. It’s Catholics of whom it is required to marry in a Catholic ceremony, although that requirement can be dispensed, even generally (potentially leading to such situations that people marry civilly and contract a sacramental marriage without knowing - according to my canon law professor, such a situation happened in Russia once).
Next, the judge has no authority to “marry” anyone, but neither has the Catholic bishop, priest, deacon or other person designated (doesn’t have to be a cleric and in fact, a justice of peace could also be designated). It’s the nupturients (persons to be married) who minister the sacrament to each other in the Roman Catholic tradition, not the cleric or other person, as that is a qualified witness.
This is quite simple with protestants, but I don’t know how the authority of valid non-Catholic bishops and churches is addressed. For example, if the persons are Orthodox and they marry by a judge while their church also prescribes canonical form like our church does. Don’t ask me, I don’t know.