A federal appeals court upheld yesterday the espionage convictions of a former U.S. Information Agency officer and a Vietnamese expatriate who were found guilty two years ago of funneling classified U.S. documents to the Socialist Republic of Vietnam.

The ruling was made with a condition, however, that could result in a new trial for the two.

The 4th U.S. Circuit Court of Appeals in Richmond rejected contentions by Ronald Humphrey and David Truong that government evidence gathered by warrantless wiretaps and used against them should not have been admitted in their celebrated case.

But the Richmond appeals court also ruled that District Judge Albert V. Bryan Jr., of Alexandria should have an opportunity to review some materials submitted by the prosecution late in the trial.

If Bryan rules that defense lawyers should have been able to see the materials before they were used, he could order a new trial, the court said.

Both Humphrey and Truong face 15-year prison sentences in the case. They have been free on bond since the summer of 1978, pending their appeals.

Neither Humphrey nor Truong could be reached for comment yesterday. Their lawyers, who said they had not read the appellate court's 67-page opinion, declined to comment.

The trial was the only one of its kind to result from the war in Vietnam and lasted for three dramatic weeks in Alexandria's federal courthouse.

It pitted one man's love for a woman he had met in war, and another man's love for his homeland, against federal government efforts to crack down on leaks of classified documents.

It questioned the president's right to order wiretaps and clandestine television taping without a warrant, and starred a Vietnam-born informant paid by the CIA and FBI.

When the verdict was delivered, jurors wept along with the defendants' families.

Humphrey admitted passing classified documents from his U.S. Information Agency office to Truong, a lobbyist on Capitol Hill who had been a leader of the antiwar movement here.

Truong, whose father once campaigned as a peace candidate for the presidency of Vietnam, admitted giving the materials to a courier for delivery to Vietnam representatives in Paris.

But both defendants steadily maintained they were never spies, that they had, for different reasons, tried only to improve relations between the United States and Vietnam.

Based on information supplied by the courier, a paid informant working for the CIA and FBI, they were arrested in January 1978.

Humphrey testified that he worked with Truong to secure the release from Vietnam of a young woman and her children -- a woman who had saved his life there, Humphrey said, and with whom he had fallen in love.

The woman, whom Humphrey called Kim, later became his commonlaw wife. He testified that they first met in 1969 when he was assigned to Vietnam, and that she had saved his life by warning him of a Vietcong attack.

But Kim became trapped there in 1975 while attempting to bring her five children out of the country.

"I had one preoccupation and that was to get them out of Vietnam. I knew I owed my life to Kim," Humphrey told the jury and a packed courtroom in Alexandria. "I felt that whatever I was doing in life wouldn't be fulfilled unless I got that family."

He said that his love for Kim caused him to lose his judgment, and that he began giving classified documents to Truong. Kim arrived in this country two months before Humphrey was arrested.

Truong had grown up the son of Vietnam's leading Rotarian, who was jailed briefly under the Diem regime and who later was defeated in a bid for the country's presidency by Nguyen Van Thieu.

At the age of 19, Truong was sent to Stanford University in California and became active in the antiwar movement. In 1968, columnist Drew Pearson said of him: "One of the several million youngsters in this country urging peace in Vietnam, probably the most effective is David Truong.

It was through Pearson that Truong made many contacts on Capitol Hill.

Truong stayed in this country after the Saigon government fell in 1975 and was active in several organizations urging reconciliation between the U.S. and Vietnamese governments.

The FBI said that Truong began giving classified documents to double agent Dung Krall in 1977. Krall testified that she delivered the materials to Vietnamese representatives in Paris.

Based on information supplied by Krall, President Carter authorized the opening of packages from Truong without a warrant. The Justice Department authorized a warrantless tap on Truong's phone and a concealed television camera was installed in Humphrey's office.

Humphrey and Truong argued consistently that the materials they were funneling to Vietnam were insignificant, that much of it was already public knowledge and did not deserve to be classified.

Some of it was found to be press clippings, and a portion of one document was labeled as "gossip." But government attorneys argued that the classified cables revealed intelligence sources and threatened U.S. security.

In upholding the conviction, the appeals court said yesterday, "The needs of the executive are so compelling in the area of foreign intelligence, unlike the area of domestic security, that a uniform warrant requirement would . . . unduly frustrate the president in carrying out his foreign affairs responsibilities."