A divorced father has won sole custody of his two daughters in a court ruling that canceled the mother's custody rights because she was not raising the children according to the tenets of Orthodox Judaism.

"Just because our society has become loose, doesn't mean Judaism has become that loose," said Stanley Lehrer, attorney for Elliot Friederwitzer, the victorious father.

Elliott and Sharon Friederwitzer signed a "joint custody" agreement when their 11-year-old marriage ended in divorce in July 1979. But after that, Friederwitzer said, his wife began a life style "flagrantly violating" an agreement that the two girls should be raised according to "the tenets of Orthodox Judaism."

Friederwitzer said his former wife was "permitting a male friend to stay in the apartment and share her bed to the knowledge of the children."

He also said his former wife "rarely" took the children to Sabbath services and was "permitting the male friend to violate the Sabbath by turning on the television."

Such activity, Friederwitzer argued, "confused the children and was contrary to their religious beliefs and detrimental to their religious feeling."

New York's highest court, the Court of Appeals, agreed this week that the apparent "lesser concern" of Mrs. Friederwitzer for the children "than for her own life style" warranted the change in custody.

Although divorce and custody laws in recent years have tried to provide more equal balance between mothers' and fathers' claims, mothers still have an excellent chance of winning custody in most court cases, according to experts in the field.

" . . . Lesbians have been keeping their children," Lehrer said. "There are many cases in which a woman has a parade of lovers in and out of the house, and the courts wouldn't change custody," he added, arguing that the violation of strict Jewish faith made the difference for his client.

The children were returned to the father when a state court judge ruled in his favor 18 months ago. Friederwitzer, a bank officer, has remarried and is living on Long Island with the two girls, age 13 and 10, and two other children from his second marriage.