The police said the demonstrators were trying to “agitate people” against an expansion of presidential powers, a lawyer for one of the detainees said.