The Carter administration signaled yesterday that it is considering a shift from its official policy restricting arms sales to Morocco, a policy that has led to increased tensions between the United States and its long time ally, King Hassan.

Under a 1960 agreement, arms sales to Morocco have been restricted to defensive weapons for use only within that country. The restrictions were imposed for fear that the Moroccans might divert U.S-made weapons to other Arab states for a war with Israel.

Morocco has become bogged down in a desert war with guerrillas of the Polisario front, which is fighting to free the Western Sahara from Moroccan administrative control and to establish a Saharan Arab Democratic Republic.

Hassan has maintained that more U.S. weapons - specifically the OV10 reconnaissance aircraft used in Vietnam - are essentil to fight the insurgents.

The guerrillas have recently become bolder, striking targets inside Morocco from bases in neighboring Algeria.

While tolerating the use of some American F5 aircraft in the desert war, the Carter administration has been reluctant to lift the restrictions for fear of a border war between Morocco and Soviet-supplied Algeria.

In March, the Moroccan parliament unaimously passed a resolution in favor of "hot pursuit" raids into Algeria, and Hassan, in public statements, indicated he is willing to carry through the mandate.

Indicative of a possible administration shift, Harold Saunders, assistant secretary of state for Near Eastern and South Asian affairs, yesterday told a House subcommittee that "the Polisario's decision to increase the scope and intensity of the fighting has made it more difficult for us to maintain Moroccan understanding for a U.S. arms policy of great restraint."

Also suggesting a reconsideration of U.S. policy, William B. Quandt of the Brookings Institution, formerly on the National Security Council and a main architect of the Egyptian-Israeli peace treaty, recommended that Congress and the administration sell Hassan OV10s while playing a mediator role in reaching a political settlement of the Sahara war.

Officially, the United States has remained neutral in the Sahara independence question. This country has never recognized Morocco's claim to sovereignty over the Western Sahara, which Hassan's troops occupied in late 1975, replacing Spanish colonial rule.

This neutrality, however, and the 1960 arms sale curb, have not stopped the sale of some U.S. weapons systems, such as the Chinook helicopter, to Morocco, two experts on the area told the House Africa subcommittee on Monday that they have photographs of U.S. made arms being used by Moroccan troops in the Sahara.

Saunders said the F5 was the only American weapon the State Department knew was being used in the desert war, in violation of the agreement. He said other weapons possibly being used there could have been purchased commercially by Morocco and thus would not fall under the restrictions of the 1960 agreement.

Rep. Stephen J. Solarz (D-N.Y.), chairman of the panel, said it was "legitimate" to consider whether the United States should change its arms policy to Morocco, in light of the stepped-up Polisario raids and the adverse effect the restrictions had had on relations with the moderate Hassan government.

Hassan was a key figure in supporting Egyptian President Anwar Sadat's trip to Jerusalem.