President Reagan and Australian Prime Minister Robert Hawke agreed yesterday that the Australia-New Zealand-United States alliance (ANZUS) is in no danger of being scrapped despite rebuffs dealt to U.S. military activities by each of its partners this week.

"The ANZUS treaty remains," Hawke said as he left the White House after a luncheon meeting with Reagan. "The relationship between Australia and the United States under the ANZUS treaty, the rights and obligations assumed by us under the treaty, are undiminished by recent events."

His remarks referred, in part, to the U.S. announcement Wednesday that it will conduct its next test of the MX missile without Australian help. The United States acted after Hawke unexpectedly told the administration that pressure from antinuclear forces in his Labor Party would force him to renege on plans to let U.S. test-monitoring planes use Australian bases.

Reagan, who spoke in glowing terms of U.S.-Australian cooperation, made no mention of Hawke's turnaround. But, talking briefly to reporters at the outset of his meeting with Hawke, he criticized New Zealand's denial of port access to a U.S. warship because the United States refused to say whether the ship carries nuclear arms.

"The only thing that has happened that disturbs us is the New Zealand position on our vessels there and the right of entry at the ports," Reagan said. "But, other than that, I think our ANZUS alliance is very sound and very solid."

A senior U.S. official, who briefed reporters later on condition that he not be identified, stressed that the administration is much more concerned about the disagreement with New Zealand than with Hawke's actions. The U.S. position is that it can find other ways to monitor the MX test and that Australia continues to cooperate on many naval-defense activities in the South Pacific.

"The MX issue was blown enormously out of proportion," the official said. "Not only has its importance been exaggerated, but it is a very unique issue. It has a very generic difference from the issue of ship visits which does apply worldwide."

The official said New Zealand's position means that the United "I think our ANZUS alliance is very sound and very solid." -- President Reagan States cannot consider it a fully functioning member of the three-nation pact. He said the ANZUS framework will be kept intact in hopes that New Zealand will change its stance, but he also acknowledged that, for now, U.S. participation in ANZUS effectively is limited to working with Australia.

Hawke, speaking at a news conference before returning home, indicated that Australia will become an intermediary within the alliance by conducting joint naval exercises separately with the United States and New Zealand.

He stressed, though, that Australia is "not in the business of trying to bring pressure to bear on New Zealand" and said he is gratified that Secretary of State George P. Shultz and other principal U.S. officials have promised not to impose economic sanctions against New Zealand.

The senior U.S. official, responding to questions about sanctions, said: "We're not trying to beat up on them. Some people are trying to portray us as angry. We're not angry. We're sorry . . . . We hope that on reflection the logic and benefits of being an ANZUS member will prevail with New Zealand . But that depends on persuasion, not pressure."

However, he said, "you can't have it both ways." He noted that the State Department intervened with Congress on New Zealand's behalf in past trade issues to argue that it was "a very loyal and faithful ally." He added, "This is obviously an argument that I can't use now."

The official was asked whether the United States will renew a special exemption that makes it difficult for U.S. producers to challenge New Zealand lamb imports. He replied that the exemption, which expires March 31, involves complex questions of whether New Zealand is in compliance with international-trade agreements and said: "It's a trade issue. It should be regarded as a trade issue."

New Zealand announced yesterday that the United States has postponed indefinitely a visit by Defense Minister Frank O'Flynn to the U.S. Pacific Fleet headquarters in Hawaii. The senior U.S. official said that was "a natural but regrettable consequence" of the dispute.