The town of Wethersfields, Conn., can revive its all-boy public school choir without risking the loss of federal education funds so long as it provides equal harmonic opportunities to girls.

So decided Albert T. Hamlin, acting civil rights director for the Department of Health, Education and Welfare, in an opinion made public yesterday by Rep. William R. Cotter (D-Conn.) The opinion applies to school districts throughout the nation.

"Our view," Hamlin wrote Cotter, "is that the Wethersfield school district should be able to sponsor or maintain all-male or all-female school choirs. . . It was generally felt that a distinction may be made between boys' and girls' voices either on the basis of range or quality."

Last year HEW warned a number of school districts that their boys' choirs illegally excluded girls.

Last summer the Wetherfield school district disbanded its all-boy choir, fearing its continuance would violate Title IX of the 1972 omnibus education act and joepardize the district's eligibility for federal funds. Title IX bars discrimination on the basis of sex.

The school district asked Cotter to intercede on its behalf with HEW, and there followed several months of correspondence between federal and school officials seeking to clarify and reclarify the situation.

At the time Cotter said that the HEW warning "many illustrate what happens hwen well-meaning but over-zealous bureucrats get hold of a good law and make it absurd."

Cotter had also said that nobody in the school system had complained about the boys' choir.

"I am very pleased that we have the option to go ahead and have the boys' choir now. It strikes me as being a reasonable ruling," said Vaughan Howland, director of elementary and secondary education for the Wethersfield school district, a system of about 5,000 pupils in the Hartford suburbs.

Howland said the choir consisted of about 50 boys in the sixth grade and that generally it sang in concerts around Christmas time and in the spring. It was formed to interest boys in choral singing, he said, because at that age most boys don't want to sing in the same group with girls.

Permission to operate boys' choir was contingent on girls' being afforded similar singing opportunities, either in mixed or single-sex groups.

The choir issue is only one of several controversies to break out over Title IX. Last summer an HEW decision that father-son or mother-daughter functions were illegal drew wide attention before the ruling was reversed by former President Ford.