A New Jersey appeals court on Wednesday ruled that a state agency had wrongfully denied a student’s application for financial aid by basing its decision on her mother’s status as an illegal immigrant. The student, who was identified only by her initials in the ruling, was born in the United States and filed her application for state tuition assistance when she was a high-school senior. Her mother is an illegal immigrant from Guatemala. The state’s Higher Education Student Assistance Authority argued that, for the purposes of the statute that governs such aid, the student could not claim to be a New Jersey resident because of her mother’s undocumented status. The court rejected that argument in reversing the agency’s decision, saying that the denial was “based upon a misapplication of law.” The student’s lawyer said that she had intended to enroll at Montclair State University if she had received the grant at the time.