A high-ranking Chilean official, visiting the United States as a guest of the State Department, has been asked by U.S. officials to leave the country following allegations by human rights organizations that he supervised and participated in the torture of prisoners after the Chilean military coup in 1973.

According to State Department sources, Jaime Lavin Farina, the director general of the Chilean Foreign Ministry, will leave the United States today. The sources said Lavin had been "recalled by his government" following an agreement by the United States and Chile that his departure was "in the best interests of both countries."

Had the Chilean government chosen not to recall Lavin, a State Department official said, "I think he would have had to leave anyway." Nothing that visitor visas can be canceled by the U.S. government, the official said: "It didn't come to that, but it could have."

The Chilean embassy said yesterday that any questions regardig the Lavin situation could not be answered until Monday.

The State Department's action adds a new dimension to U.S. policy concerning human rights. Earlier this week, department spokesmen issued strong statements regarding treatment of dissidents in Czechoslovakia and the Soviet Union.

During his campaign and since his inauguration, President Jimmy Carter has said that human rights issues would play an important role in the determination of U.S. policy. During the campaign, Carter specifically referred to the situation in Chile.

Lavin, who is the third-ranking officer in the Chilean Foreign Ministry, arrived here for a four-week "leadership-grant program" tour of the United States on Jan. 4. Candidates for such tours are nominated by U.S. embassies abroad as potential leaders in their own countries.

Soon after his arrival, the State Department began receiving protests from Chilean exile groups and American organizations involved with Latin America.

According to testimony before an international commission of inquiry held in Mexico in 1975 on the Chilean coup, Lavin was mentioned by name as having supervised and participated in the torture of former Chilean air force officers in his capacity as warden of the Academy of War, an alleged detention and torture center.

Testimony by former prisoners presented in Amnesty International documents makes similar allegations.

One of Lavin's first appearances in the United States was at the Columbia University Insitute of Latin American studies on Jan. 17. According to a letter to Secretary of State Cyrus Vance, signed by eight professors and students present at that meeting, Lavin was questioned about human rights in Chile and answered that he was not aware of prisoners being illegally detained or of instances of torture.

"This man," the letter said, " . . . was directly responsible for the torture of military colleagues. Conditions in the prison in which this man was warden and interrogator are well known."

A spokesman for Rep. Tom Harkin (D-Iowa) said yesterday that Harkin and several other members of Congress who are active in human rights issues plan to send a letter to Vance protesting Lavin's trip.

While one State Department official cautioned that the charges against Lavin were only "allegations" and that "there are some people who might think this is some kind of kangaroo court if all it takes to keep Chileans out of the U.S. is to say 'This guy is a well-established torturer'," others said the most important question was why Lavin had been invited in the first place, add five.

"I doubt that anybody who knew of these accusations would have dreamed of inviting him," one source said. "What it suggests is that a lot of our people don't have the contacts" needed to be aware of such information.

Regardless of U.S. government opinion on Lavin's guilt or innocence, the source said, "Where there's smoke, the prudent bureaucrat sees fire, and therefore does not make a move."

"This whole thing," the source said, "is something of a disaster."