President Reagan underscored the words of Douglas MacArthur that "there can be no substitute for victory" as he went to the Pentagon yesterday to honor the World War II general at a dedication ceremony.

Reagan, who has called the Vietnam war a "noble cause" that military leaders were not allowed to win, said in his speech on the Pentagon parade ground that "we must always remember" MacArthur's dictum.

Standing on a podium rimmed with pots of yellow chrysanthemums, Reagan called MacArthur, who died in 1964, "an authentic American hero" who lived the military commandments of "duty, honor, country."

Thirty years earlier, another American president, Harry Truman, fired MacArthur as commander of American troops in Korea because the general kept going public with his criticisms of civilian restraints on prosecuting that war.

Reagan's glowing tribute was in a sense a rehabilitation of MacArthur from the standpoint of the White House. Reagan ended his speech by saying that "as long as America holds her brave in a place of honor; as long as we as a people seek to keep alive the ideals of selflessness and freedom; as long as we look to the wise and the just for inspiration, our thoughts will turn to the general, and the general and the general."

After the outdoor ceremony, replete with a 21-gun salute to Reagan and marching bands, the president went inside the Pentagon to dedicate a second-floor corridor depicting the life of MacArthur. He was accompanied by Defense Secretary Caspar W. Weinberger and Jean MacArthur, the general's widow.

Mrs. MacArthur, wearing a light blue suit and walking stiffly, went to the microphone to express her appreciation for the honor being paid her husband. "I thank you, and I thank you for my general, too," she said.