Officiating weddings isn’t a requirement for judges or justices of the peace. A new rule will let them perform only opposite-sex marriage ceremonies.