U.S. Secretary of State Cyrus R. Vance ended his week-long Middle East mission today convinced that Arabs and Jews are agreed on the "desperate need for peace" but remain deeply divided on how to achieve it.

In a news conference this morning before embarking on an all-day flight back to Washington, Vance said he had accomplished the objectives of his first foreign trip since taking office --and his first personal experience in this long-troubled arta of the world.

He declared again today that the trip is only the first phase of an extensive U.S. diplomatic process aimed at the convening of a Geneva peace conference in the second half of the year.

Vance acknowledged that there had been no progress at all in reaching agreement on the role of the Palestine Liberation Organization, a procedural roadblock to overall discussions. The United States and Israel refuse to recognize the PLO under present circumstances, while Arab nations insist on a role for the PLO in the negotiating process.

U.S. action in the peace process will now shift to visits to Washington in March and April planned by Arab and Israeli leaders and a scheduled meeting between President Carter and Syrian President Hafez Assad in Europe in May. Vance may return to the Middle East in June or a little later for further talks leading to a Geneva conference late this year.

As if to demonstrate the wide differences between the Arab states and Israel, President Assad took a rock-hard position at a separate press conference this morning on allowing Israel to keep some occupied territory, even if all other issues are settled.

"Absolutely no. Syria cannot give up a single inch of her territory," Assad declared.

During his 30-minute meeting with American reporters, Assad gave no public expression of what diplomats have described as a new spirit of accommodation and flexibility on the part of Arab leaders toward the issues dividing them and Israel.

But American diplomats here noted that Assad's continued hard line in public is no different from the public hard line maintained by Israel and may not accurately reflect the undercurrents of accommodation in the area.

Nonetheless, Assad remained firm on the Palestinians' right to be present at Geneva, even though he is believed to be working behind the scenes to change the policies of the PLO to make it more acceptable to the United States and Israel.

While maintaining that the Palestinians have the right to decide how they should be represented at Geneva --tion, under the wing of Jordan or as part of a joint Arab delegation -- Assad said this PLO decision will be made "in coordination with all of us (the Arab powers)."

Regarding Egyptian President Anwar Sadat's plan to have the Palestinians unite with Jordan before the Geneva peace talks, Assad said Syria favors all unions between Arab powers, but any possible union between the Palestinians and Jordan should have no relation to Geneva peace talks.

During Vance's meeting with reporters, it was apparent that no dramatic breakthroughs had been achieved in the Arab or Israeli positions. Maneuvering over the nature and affiliation of a separate Palestinian state on land now occupied by Israel, however, indicated signs of unusual flexibility and potential for compromise within the Arab world, he said.

In his remarks to the American reporters who accompanied him to Israel, Egypt, Lebanon, Saudi Arabia, Jordan and Syria, Vance sought to emphasize the continued chances for progress toward peace while still taking note of the grave difficulties, antagonisms, and crosscurrents that frustrate that pursuit.

Even if the parties can be brought to a new Geneva conference this year --they will face each other with "deeply held views that will be difficult to change," he said.

He added, however, that if the Arab and Israeli leaders face each other at the conference table, "there is always a possibility that they can reach compromises and accommodations."

Vance reported that all the Middle East parties said that if procedural questions can be resolved "they are prepared to discuss all substantive questions at Geneva without preconditions" and are prepared to go to Geneva in the last half of 1977.

Arabs and Israelis agree that the three "core elements" of a final settlement are "peace, [Israeli] withdrawal and resolution of the Palestinian question," Vance said.

There are sharp divisions, however, on the question of how to deal with the PLO and on "the meaning and shape" of an Israeli withdrawal.

As far as President Assad is concerned, the Syrian leader said the meeting with Vance "left a positive impression on me. Our discussions were useful and fruitful."

Asked if revelations in The Washington Post that Jordan's King Hussein had been on the Central Intelligence Agency payroll for 20 years would affect the present close relationships between Syria and Jordan, Assad said, "I doubt the relationship between King Hussein and the United States is that relation which has been described by certain American newspapers."

"Of course," he continued, "we are aware there is a friendship between the king and the United States. This is one thing and what has been raised in the American press is another thing."