The Senate last night rejected a proposed moratorium on underground nuclear tests and restrictions on new chemical weapons, giving the Reagan administration a pair of victories on defense policy for next year.

It also rejected, 62 to 28, a proposal from Sen. Jesse Helms (R-N.C.) to put the Senate on record against a nearly completed U.S.-Soviet treaty to eliminate intermediate-range nuclear forces (INF) unless it is "unquestionably verifiable" and the president certifies the Soviets are not violating the 1972 Anti-Ballistic Missile (ABM) Treaty.

Sen. Alan J. Dixon (D-Ill.) described the proposal as a "treaty killer," and Sen. Dale Bumpers (D-Ark.) tried to prod an angry Helms to say whether President Reagan's assurances about verification provisions would satisfy him.

The votes came as the Senate worked into the night on amendments holding up approval of a $303 billion defense authorization bill for fiscal 1988.

By 62 to 35, the Senate rejected a proposal from Sens. Edward M. Kennedy (D-Mass.) and Mark O. Hatfield (R-Ore.) to halt testing for two years of all but the smallest nuclear weapons so long as the Soviet Union suspended testing and agreed to on-site monitoring and other verification requirements.

It then voted 52 to 44 against an amendment sponsored by Hatfield to block assembly of a new generation of nerve-gas artillery shells for a year, and 49 to 48 against a proposal by Sen. David Pryor (D-Ark.) to halt production of a new chemical bomb, known as Bigeye.

Rejection of these arms curbs contrasted with Senate approval last week of restrictions on testing and development of the president's Strategic Defense Initiative (SDI), which prompted President Reagan to threaten to veto the whole defense bill.

The Senate has previously opposed both a nuclear test ban and chemical weapons curbs, while the House has supported them.

In other action on the defense bill, the Senate:Reiterated its opposition to Soviet occupation of its Mount Alto embassy compound here by voting 69 to 27 to scrap an existing U.S.-Soviet embassy agreement and prohibit the Soviets from building a new structure on land exceeding 90 feet above sea level. The height restriction would reduce the embassy's electronic surveillance capabilities. Voted 97 to 0 to threaten Panama with a cutoff of aid and other sanctions unless it moves to restore democratic rights and establish civilian control over its military. Approved, 96 to 1, a proposal to urge Japan to increase development assistance and other contributions to mutual security in an effort to compensate for military limitations imposed by its constitution. Gave voice-vote approval to an amendment limiting foreign participation in military construction in the United States.

In debate over the testing moratorium, Hatfield contended that the best way to avoid nuclear war is to rein in what he called the "runaway technology" of the arms race.

In opposing Hatfield's proposal, Sen. J. James Exon (D-Neb.) praised his motives but noted that the United States and the Soviet Union agreed last week to begin talks on a comprehensive testing ban. Hatfield's proposal, he said, would "demand too much too soon."

In the chemical weapons debate, Hatfield contended a one-year delay in final assembly of the artillery shells would "give peace one more chance," without jeopardizing U.S. stockpiles.

Advocates of assembling the weapons argued that the Soviets lead in chemical weaponry and said defeating the amendment would help negotiations to ban chemical warfare.