The United States is formulating plans to renounce its security obligations to New Zealand because of that nation's plans to ban visits by U.S. ships carrying nuclear weapons, but will not scrap its regional defense treaty, according to administration officials.

The U.S. mutual defense treaty with New Zealand and Australia -- known as ANZUS -- would remain intact to prevent disruption of U.S. military relations with Australia, ties that anchor western security interests in the South Pacific.

"We'd keep the framework in place without the substance," a Defense Department official said. "New Zealand would remain a member in name only, and military cooperation with Australia would continue as usual."

The 34-year-old treaty has been strained since New Zealand decided in February to bar port entry to a destroyer, the USS Buchanan, because the United States refused to say whether it carried nuclear weapons.

In protest, the administration canceled ANZUS naval exercises, halted intelligence-sharing with New Zealand and warned that any move to formalize the nuclear weapon ban would trigger a U.S. reassessment of its treaty obligations to New Zealand.

But Prime Minister David Lange, elected in July 1984 on an antinuclear platform, ignored the warning by asking his Parliament two weeks ago to prohibit port visits of foreign warships and landings of foreign aircraft unless the prime minister is "satisfied" that they are free of nuclear weapons.

Administration officials said the proposed ban on nuclear-capable aircraft is new and unacceptable to the United States. The legislation also would prohibit nuclear-powered ships, about 40 percent of the U.S. Pacific fleet.

Although the two governments are attempting to accommodate their conflicting concerns, U.S. officials are increasingly pessimistic.

A bipartisan group of senators sent a letter Thursday to Lange and President Reagan saying relations are "in danger of very serious deterioration" and urging them to work out a compromise.

New Zealand is deemed of limited strategic importance to the United States. It hosted a smattering of U.S. ship visits every year until the current controversy. A logistics support facility in Christchurch is a refueling point for military planes transporting personnel and equipment for the National Science Foundation's Antarctic research.

Access to New Zealand ports and landing fields is considered important chiefly for ANZUS military exercises, repairs and crews' rest and recreation.

Australia receives dozens of American ship visits annually and hosts six joint military facilities, including important intelligence-gathering posts and a center for servicing submarine communications equipment. Australia co-produces parts for U.S. Navy aircraft and participates in joint military research and development efforts.