President Reagan yesterday used the presentation of the nation's highest military award as a platform for declaring that the United States had lost the war in Vietnam because its soldiers had not been permitted to win.

"Several years [ago] we brought hom e a group of American fighting men who obeyed their country's call and fought as bravely and well as any Americans in our history," Reagan said to the cheers of military men and their families at a Pentagon ceremony. "They came home without a victory not because they had been defeated but because they had been denied permission to win."

The occasion of the president's remarks, which recalled his controversial campaign declaration to the American Legion last Aug. 20 that the Vietnam war was "a noble cause," was the presentation of the Medal of Honor to Roy P. Benavidez, 45, a retired Army sergeant who is credited with saving the lives of eight Green Berets in a battle near Loc Ninh on May 2, 1968.

The Joint Chiefs of Staff in 1976 refused to grant the award to Benavidez, of El Campo, Tex., because there was only one coroborating witness to his heroism. They reversed their decision last year when another witness was found.

Yesterday, with his wife and three young children watching proudly, Benavidez received full military honors and listened impassively while Reagan read a citation recounting a saga of jungle heroism under heavy fire.

Benavidez, wounded in the face, head and one leg, dragged his fallen comrades to a waiting helicopter and killed a Vietnamese soldier who attacked him along the way. When the helicopter was destroyed and the pilot killed, he organized the survivors into a defensive ring and killed two more enemy soldiers as the group waited for another helicopter.

In presenting the 239th Medal of Honor for valor in Vietnam, Reagan said that all the veterans of that war had been overlooked far too long.

"It's time to show our pride in them and to thank them," he said.

In his 1976 presidential campaign, Reagan frequently sounded the theme that U.S. troops had been denied victory in Vietnam by the restraints imposed on them at home. After his "noble cause" remark created a stir, Reagan soft-pedaled such declarations in 1980, but he has never changed his view that Vietnam veterans have gotten too little credit for their sacrifices. v

"They were greeted by no parades, no bands, no waving of the flag they had so nobly served," Reagan said yesterday. "There was no thank you for their sacrifice."

Reagan is known to feel that some of the celebrated movies and books about Vietnam portray an unduly harsh view of American conduct in the war. He said yesterday that some of the best-known films had failed to depict the many generous acts of Americans in Vietnam. And he then related stories and statistics about hospitals built and children assisted by U.S. soldiers.

Every window on the Pentagon courtyard was jammed with onlookers as Reagan draped the blue-ribboned Medal of Honor, awarded only for gallantry "above and beyond the call of duty," around the neck of Benavidez. Afterward, Reagan and Benavidez shook hands with guests at a private reception.