A legal battle is playing out in Mexico over a well-known immigration activist and lawyer who was arrested earlier this month for alleged human trafficking and then ordered released by a judge in a case that underscored the conflicted stands on protecting migrants among Mexican officials.