The Soviet government may allow Andrei Sakharov, the country's foremost civil rights activist, to emigrate to the West, a Cabinet minister has suggested.

The Nobel Peace Prize laureate, who has been confined for three years to internal exile in the industrial city of Gorki, has been formally offered a visiting professorship at Vienna University, it was reported here today by reliable diplomatic sources.

At the same time, word spread here that Soviet Minister of Justice Vladimir Terebilov, in an interview aired by Swedish television last night, said that if Sakharov "would apply for a visa now, there would be no obstacles."

It was the first time such a statement has been made by a high official. Sakharov was not reachable for comment in Gorki, but at the time of his banishment his wife, Elena Bonner, told a group of western journalists that Sakharov felt "the West is preferable to Gorki."

Sakharov, a physicist who helped develop the Soviet hydrogen bomb, was refused permission to leave the country to attend the Nobel award ceremonies in Oslo in 1975. Since his banishment to Gorki in 1980, he has been effectively denied all information on recent Soviet scientific developments.

Against this background, the new Soviet leadership is believed to be considering Sakharov's departure to the West as a gesture of good will on the human rights question as well as a way to resolve a highly embarrassing problem.

Western sources here said they had indications from Sakharov's relatives and friends that he may now seek to emigrate even if he would be barred from returning to the Soviet Union.

They said that the physicist has found his banishment increasingly oppressive. The absence of information and contacts with his colleagues is said to be preventing him from continuing his work. His wife reported in October that he was drugged in his automobile and robbed of his manuscripts.

In Cambridge, Mass., Effrem Yankelevich, husband of Sakharov's stepdaughter, said he found the justice minister's comments "an interesting development" but, he added, "I really don't place too much significance in it." Yankelevich said the minister's statements appeared to be designed to offset western criticism of the government's treatment of Sakharov.

The Terebilov interview was taped April 15 during the minister's visit to Stockholm and was broadcast the same day. The minister's remarks about Sakharov went unnoticed, however. The same remarks were rebroadcast last night in a different program and were picked up by western journalists.

Asked about his Stockholm remarks, Terebilov said through a spokesman today that his ministry had nothing to do with issuing visas. He added, "I suppose that the question of academician Sakharov leaving the Soviet Union--if he applies with the appropriate request--will be decided by the competent authorities according to standard procedures."

Members of the Soviet Cabinet normally do not comment at all on such matters.

Diplomats in Moscow told Reuter that Peter Weinzierl, head of Vienna University's Institute for Experimental Physics, had said he believed there was a great possibility Sakharov would be allowed to leave the Soviet Union.

The hint that Sakharov may be allowed to go to Vienna suggests an official assessment that the physicist has little to tell western intelligence about current Soviet weapons programs and that what he learned during his long years as a top nuclear-weapons specialist is now dated.

Apart from his work on the hydrogen bomb, Sakharov did research on controlled nuclear fusion and is credited, together with his teacher Igor Tamm, with having discovered the method of igniting hydrogen in an uncontrolled series of fusion reactions. Sakharov also has done work that led to the first so-called Tokomak fusion reactor.

He lost his security clearance in 1968 after the publication in the West of an essay dealing with the possible "convergence" of the socialist and capitalist systems.

In the 1970s, he became deeply involved in the human rights movement, turning his back on the privileges of the Soviet elite and joining a small group demanding democratic freedoms. For the four years preceding his banishment, Sakharov's was the most prominent voice of the group.

But even before his banishment to Gorki, Sakharov had been increasingly frustrated by the goverment crackdown on dissent that saw many of his colleagues in the human rights movement getting long prison terms.

While in Gorki, he staged a hunger strike to win an exit visa for his stepson's wife-by-proxy to emigrate to the United States. Since then, however, his isolation had become almost complete.

There were indications that his reputation at home was damaged in the wake of his hunger strike as the Soviet media denounced his lack of patriotism and quoted extensively from his interviews with western publications in which he criticized Soviet policies.

With his banishment, the dissident movement has practically ceased to exist even as a loosely knit group. Some prominent members--such as Anatoly Scharansky and Yuri Orlov--are serving prison terms. Others have gone into exile.

Recently, authorities granted an exit visa to one of the last leading dissidents, writer Georgy Vladimov. He had been invited to teach in West Germany.