ROME, JUNE 6 -- Pope John Paul II today issued a renewed appeal to President Reagan to end the arms race and cautioned against those individuals and nations that have rejected or "given mere lip service" to moral and spiritual values.

The pontiff told Reagan, whose presidency has been beset by allegations of wrongdoing in recent months, that moral and spiritual values must be "truly integrated into daily life."

Presidential spokesman Marlin Fitzwater quoted Reagan as reporting that he and the pontiff devoted most of their 55-minute private meeting to U.S.-Soviet relations and Soviet leader Mikhail Gorbachev. Fitzwater said Reagan gave the pope "a status report" on the Geneva arms control negotiations and "said he was optimistic about an arms control agreement."

But on a day in which the two leaders discussed the arms race there was a poignant symbol of the object of their concern -- one member of the White House party greeting the pope was Maj. Ron Thomas, the president's military aide who carried the nuclear "football" containing codes the president would need in the event of a nuclear attack.

Speaking after his meeting with Reagan and on the eve of his visit to Poland next week, the pope urged the president to accept policies of "international cooperation" and to look at "enemies" in a "new perspective, as brothers and sisters in the human family."

But Reagan used his remarks at the Vatican to criticize one of his most frequent adversaries, the Soviet Union, and other governments that have repressed the freedom to worship.

Reagan said the "power of the spiritual force" had been demonstrated in Poland, a reference to the rise of the Solidarity labor movement, "just as we see the powerful stirrings to the East of a belief that will not die, despite generations of oppression."

"Perhaps it is not too much to hope that true change will come to all countries that now deny or hinder the freedom to worship God," Reagan said.

The pope did not join Reagan, as he had been expected to do, when the president paid a courtesy call later on American seminarians at the Vatican. There was no explanation for the pope's absence.

Reagan was upbeat in his remarks to the seminarians, saying, "His Holiness and I have just concluded an exchange of ideas and his, obviously, were better than mine." Reagan also declared, "Things are going pretty well in your homeland." Both remarks drew laughter from the group, which gave the president three cheers of "Hip Hip Hooray!" on his departure.

The president last visited the Vatican in 1982, and the pope looked back to that visit in making an appeal to Reagan for progress in controlling the arms race to make available "immense resources" to alleviate misery and hunger. The pope said, "I am confident . . . that you share my continued concern about these issues."

Both Reagan and the pope took note of the recent establishment of diplomatic relations between the United States and the Holy See. From 1870 to 1984, the United States did not have diplomatic relations with the Vatican, although several presidents, including Reagan, designated personal envoys to the pope.

The pope said he looks forward to his visit to the United States scheduled for September. In their public comments, both men refrained from comment on recent controversy over church doctrine, including a crackdown on some theologians in the United States who have advanced dissident views on moral and sexual issues.

The pope did not make direct reference to Reagan's troubles at home with the Iran-contra scandal. But he said early in his remarks: "Whenever moral and spiritual values are rejected, or even given mere lip service and not truly integrated into daily life, then we, as individuals or groups, as communities or nations, fall short of what we were intended to be as men and women created in the image of God."

Reagan met alone with the pope in his library at the Vatican.

About 5,000 paramilitary and police officers were mobilized in Rome for Reagan's brief visit today, and security was tight.

The Vatican was the scene of one of Reagan's most acute first-term embarrassments, when he fell asleep in a televised audience with the pope during his 1982 visit. Today's visit appeared to go more smoothly. Among those in the small White House party accompanying the president and First Lady Nancy Reagan to greet the pope was Julius Bengtsson, Mrs. Reagan's hairdresser, and Reagan's personal physician, John Hutton.

Nancy Reagan, in an ankle-length black dress, joined the pontiff and the president afterward for a discussion of her antidrug campaign, and Fitzwater said she will join the pope in Los Angeles Sept. 16 for a visit to an elementary school to discuss drugs.

Fitzwater confirmed that President Reagan will meet the pontiff again Sept. 10 in Miami. The pope is scheduled to visit Florida, South Carolina, Texas, New Mexico, Arizona, California and Michigan.