President Reagan, in a farewell address to the United Nations, said Monday it is "more than a possibility" that a treaty curbing intercontinental ballistic missiles can be signed with the Soviet Union within the next year.

In a speech at the opening of the General Assembly, Reagan also called for an international conference to stop the use of poison gas and other chemical weapons.The president reviewed what he said has been progress toward peace in his administration but added that "history teaches us caution" and that "even in this time of hope, the chance of failure is real."

He called upon Iran and Iraq to cooperate in implementing the U.N. resolution on their Persian Gulf war, saying, "Let this war end now. . . let peace come."

In Afghanistan, he said, "We encourage the Soviet Union to complete its troop withdrawal at the earliest possible date so that the Afghan people can freely determine their future without further outside interference."

The president condemned "the continuing deterioration of human rights in Nicaragua and the refusal of the tiny elite now ruling that nation to honor promises of democracy made to their own people and to the international community."

He called on the Soviet Union to "assist in bringing the conflict in Central America to a close by halting the flow of billions of dollars of arms and ammunition to the Sandinista regime" in Nicaragua.

And he said he will "continue to urge the Congress and the American public to stand behind those who resist this attempt to impose a totalitarian regime" on the Nicaraguan people.

Soviet Foreign Minister Eduard Shevardnadze, sitting with the Soviet delegation to the General Assembly, nodded as Reagan spoke of progress on arms control. Members of the Nicaraguan delegation were expressionless as the president charged their country's Marxist-led government with repressive practices.

Turning to negotiations on long-range nuclear weapons, the president said, "I can tell this assembly that it is highly doubtful such a treaty can be accomplished in a few months, but I can tell you a year from now is a possibility, more than a possibility."

Then, in an emotional passage, he said, "Poison gas. Chemical warfare . . . the terror of it. The horror of it. We condemn it. The use of chemical weapons in the Iran-Iraq war - beyond its tragic human toll - jeopardizes the moral and legal strictures that have held these weapons in check since World War I."