A federal appeals court held yesterday that an acknowledged homosexual cannot be denied citizenship because of his sexual preference.

The 4th Circuit Court of Appeals, reversing a decision by an Alexandria judge, ruled that the sexual life of Horst Nemetz, a 41-year-old suburban Washington hairdresser, "cannot serve as the basis for a denial of a finding of good moral character because it has been private, consensual and without harm to the public."

Nemetz, a West German who works in Springfield, had applied to become a naturalized citizen in 1976, but the Immigration and Naturalization Service rejected his petition, arguing that it believed that as a homosexual Nemetz had violated Virginia's sodomy laws.

District Judge Oren R. Lewis accepted that argument, holding that Nemetz's sexual practices showed he lacked the "good moral character" required under naturalization laws.

But a three-judge appeals court panel in Richmond overturned his ruling yesterday, declaring that widely varying state laws covering homosexual acts cannot substitute for "the constitutional mandate of uniformity in the area of naturalization."

At least nine states have decriminalized sodomy between consenting adults, the court noted and, if Nemetz had lived in one of these states, the Immigration and Naturalization Service could not have used state law to reject his application for citizenship. "In other words, but for an 'accident of geography,' Nemetz perhaps would be a naturalized citizen today." '

Lawyers familiar with the gay rights issues hailed the decision as major victory for homosexuals because it prevents the federal government from using state laws to determine what constitutes good moral character. If upheld, Washington lawyer Leonard Graff said, the ruling would be "very significant."

Justice Department lawyers declined commend yesterday on whether they will appeal the decision, saying they will have to study the court's 12-page opinion.

Nemetz "is just delighted . . . this has really been a burden for him to carry," said his lawyer, Richard Murray. "What bothered him was the fact that he could not become a citizen just because of the fact that he was a homosexual. He feels vindicated."

"I began to feel that maybe the system was against me," Nemetz said in a statement issued by Murray. Nemetz added that he now believed his court challenge "really seems to have been worthwhile. Maybe this is all part of being an American."

When Nemetz had petitioned to become a naturalized citizen, immigration examiners expressed concern about his homosexuality, although he never described his sexual activities for a hearing examiner. In its ruling the appeals court said that Lewis had properly inferred that Nemetz had committed sodomy.

Murray, in a written argument to the appeals court, said that Nemetz had shown himself to be a good candidate for citizenship and that Lewis "committed a reversible error in failing to recognize a federal standard of uniformity (in state laws) in matters affecting naturalization."

If Congress had wanted to bar homosexuals from gaining citizenship, the appeals court said, it "could easily have incorporated" such a provision in immigration law. "Its failure to do so leads us to the conclusion that it did not intend purely private sexual activities to act as an absolute bar to a finding of good moral character."