The ruling by the court, which has a narrow conservative majority, comes as Republicans have tried to limit voting access in the state’s cities.