ope John Paul II solemnly appealed today to President Reagan to use his influence in the cause of world peace and in behalf of the economic and social advancement of developing nations.

"America is in a splendid position to help all humanity enjoy what she herself is intent upon possessing," the pontiff said in an exchange of views with Reagan in the ornate papal library in the Vatican.

Reagan, who spoke first, declared his admiration for the pope's "active efforts to foster peace and promote justice, freedom and compassion in a world that is still stalked by the forces of evil." Afterward, the president and the pope appeared together before a group of cheering American seminarians and priests, who sang "America the Beautiful" and "God Bless America" as the president brushed away a tear.

It was sleep rather than tears that the president battled during the pope's speech in the warmth of the papal library. After a long weekend of discussions and ceremonial events with six other leaders of major industrial nations at the economic summit in Versailles, France, the 71-year-old president was visibly tired. At times he appeared to be struggling to stay awake as the pontiff delivered an appeal for world peace and justice in strong Polish-accented English.

Reagan has been on a grueling schedule since leaving the United States Wednesday afternoon to fly to Europe for a 10-day visit. He held meetings in Paris with British Prime Minister Margaret Thatcher and French President Francois Mitterrand on Thursday and then flew to Versailles Friday to begin meeting with the other summit leaders. He left France early today after staying up late the night before reviewing the situation in Lebanon, where the Israeli invasion is of mounting concern to the United States.

Later, in London, White House deputy press secretary Larry Speakes acknowledged that Reagan, who slept about six hours Sunday night, was tired. "We're all tired," Speakes said.

"Peace is not only the absence of war," the pope said to Reagan. "It also involves reciprocal trust between nations, a trust that is manifested and proved through constructive negotiations that aim at ending the arms race and at liberating immense resources that can be used to alleviate misery and feed millions of hungry human beings."

Pope John Paul's call for peace was reminiscent of the statements he made in a visit to Britain during the last week of May. The pope referred to that visit today, restating his view "that the scale and the horror from all warfare, whether nuclear or not, makes it totally unacceptable as a means of settling differences between nations."

Reagan has backed British efforts to solve the Falklands dispute by military actions. Later this week the president will journey to Bonn for a summit meeting of NATO leaders where he is expected to argue the necessity for increased conventional armaments to match what he sees as a Soviet military threat.

On the other hand, the pope's efforts to ease repression in Poland and his denunciation of violence in Lebanon have been welcomed by the Reagan administration.

Welcome, too, at a time when many traditional U.S. allies have become skeptical of Reagan administration policies, is the support of the Italian government for Reagan's foreign policy initiatives, especially the start of nuclear arms reduction talks.

Reagan and Italian Prime Minister Giovanni Spadolini flew together on Air Force One today from Versailles to Rome and discussed a wide range of diplomatic and economic issues on which they shared broad agreement.

Shortly after he returned to his office at the Palazzo Chigi in downtown Rome, Spadolini and the White House released a joint statement reviewing the Versailles summit and declaring that "it is of the utmost urgency to bring a cessation of the fighting" in Lebanon.

Italian sources said that Reagan's visit was seen primarily as an acknowledgement of Italy's respectable rank in the NATO alliance. For the Americans, for whom the Vatican visit predominated in significance, the meeting with Spadolini was primarily an occasion to show gratitude to Italy.

In an interview this week with the Italian weekly Famiglia Cristiana, Ambassador Maxwell Rabb said that Italy had become one of the United States' key allies. He cited Italy's fidelity to the Atlantic Alliance, an apparent reference to Italian willingness to deploy 112 cruise missiles there, and the liberation of Gen. James L. Dozier from a Red Brigades hide-out in January.

Reagan's meeting with the pope, like his private session with Spadolini, was outwardly warm and friendly. But the pontiff appeared to be delivering a mild lecture to the president on the necessity of economic aid for developing countries, a theme that French President Mitterrand also stressed at the weekend summit.

"Success in resolving questions in the North-South dialogue will continue to be the gates of peaceful relations between values and political communities, and continue to influence the peace of the world in the years ahead," the pope said. "Economic and social advancement linked to financial collaboration between peoples remains an apt goal for renewed efforts of the statesmen of the world."

The pope and the president, both of whom were wounded by the gunshots of would-be assassins in 1981, spent 45 minutes in private conversation before their public exchange of views, which was televised in the United States and Italy. They made no reference in public to the assassination attempts.

During the meeting with the seminarians, Reagan invited the pope to visit the United States and was promptly drowned out by tumultuous applause.

The pontiff previously visited the United States in 1979, when Jimmy Carter was president, and he concluded his remarks today with his farewell words to America on that occasion.

"My final prayer is this," the pope said, "that God will bless America so that she may increasingly become and truly be and long remain one nation under God, indivisible, with liberty and justice for all."

In his remarks Reagan expressed respect for religious precepts and said that "the Ten Commandments and the Golden Rule are as much a part of our living heritage as the Constitution we take such pride in." The president also pledged to take seriously the issue of nuclear disarmament, which has become an issue of increasing concern to John Paul.

"Today, Your Holiness, marks the beginning of the United Nations special session on disarmament," Reagan said. "We pledge to do everything possible in these discussions, as in our individual initiatives for peace and arms reduction, to help bring a real, lasting peace throughout the world. To us, this is nothing less than a sacred trust."