The determination of President Carter and Australia's Conservative Prime Minister Malcolm Fraser to boost the West's military presence in the Indian Ocean has triggered a new debate in Australia over the risks of military links with the United States.

The opposition Labor leader Bill Hayden charged this week that Fraser, by offering a base in the state of Western Australia for U.S. nuclear-armed vessels, would "convert the region, including the city of Perth, into a potential prime nuclear target" in the event of Soviet-American confrontation.

"The Labor Party strongly supports the American alliance," Hayden said. "But the alliance has never before extended to the point of providing permanent bases in peacetime for American military forces."

During a recent visit to Washington to discuss the Soviet invasion of Afghanistan, Fraser offered the United States use of the new naval base at Cockburn Sound as either a "home port" or a "base port" for American nuclear aircraft carriers and other warships from Indian Ocean task forces.

He said the offer was "put on the basis that the United States would consider it and come and speak with us at the appropriate time when it had made up its mind. Considerable investment would probably be required for the kind of facilities needed and that would involve United States expenditures.

"But we have also indicated that we are prepared to consider participation in that expenditure if a proposal from the United States is made in a formal way."

Fraser distinguished between the two types of base expansion envisaged by pointing out that if Cockburn Sound became an American Navy "home port," American families would be based there and family housing would have to be built.

Even a "base port" would need substantial expenditures -- hundreds of millions of dollars, according to Australian officials -- to set up the naval facilities and technological support systems to service sophisticated American ships and weapons systems.

The Australian offer was first revealed by the Washington correspondent of the Australian Financial Reviews' Brian Toohey, who said that Fraser made it during a meeting at Blair House on Jan. 30 with U.S. defense officials led by Deputy Defense Secretary W. Graham Claytor. Toohey reported that Fraser "came on as such a vigorous hawk" that the Pentagon was encouraged to upgrade its requests to Australia.

Fraser and Defense Minister Jim Killen acknowledged what is electoral dynamite in Australia in a year when Fraser faces a national election -- that his government was opening the door for Washington to set up a permanent military base in Australia.

Fraser's offer touches an emotional issue here by focusing on a conflict between Australia's obligations under the formal ANZUS treaty linking it with the United States and New Zealand and its desire for completely independent sovereignty.

The Australian naval base at Cockburn Sound was commissioned last year more than 75 years after West Australians began agitating to have some sort of defense facility in their immensly rich but isolated and underpopulated state. With an area of nearly a million square miles and vast deposits of minerals, Western Australia even now has a population of only 1.4 million.

But to gain maximum electoral impact from the $100 million base, the national government built it on the outskirts of the state's only urban complex -- Perth and its port satellite of Fremantle.

The introduction of nuclear weapons near a major urban center is likely to become an election issue.

The opposition leader and other moderates in the Labor Party, which has a strong core of ideological socialism and a element of anti-Americanism, have been careful to avoid any declaration that they would ban American ships from Cockburn Sound. But they left no doubt that they would try to prohibit nuclear weapons from being carried into the port or stored there.

Hayden, in particular, has gone out of his way to cultivate American officials based in Canberra to build links to the Carter administration and the Democratic Party -- which has many similar roots and traditions to the mainstream of the Australian Labor Party.

As a minister in the 1972-75 government of Gough Whitlam, Hayden remembers the strains that developed between Canberra and Washington over the Labor government's attempts to win more control over existing American defense facilities in Australia and the open clashes between the Whitlam and Nixon administrations over Vietnam -- Whitlam having withdrawn Australia's military forces from Vietnam the day after he was elected.

In several modern elections in Australia, Labor has lost votes after the Conservatives managed to pin an anti-American tag on it. Labor was opposed to the construction of the two important American bases now on Australian soil and most observers are convinced that their attitude hurt labor.

But in the earlier cases, there was no question of risk to large Australian populations or any question of nuclear weapons being brought into Australian harbors. One is a communications base on the remote northwest cape near Exmouth, which is one of the key links between Washington and Polaris submarines operating in the Southern Hemisphere.

The other is a space research facility at Pine Gap in central Australia that is believed to have become even more important as a receiver of intelligence about the Soviet Union from spy satellites and as a monitor of Soviet missile activity, since the loss of U.S. intelligence bases in Iran. s

Cockburn Sound is now a reatively calm harbor capable of servicing four destroyers and three submarines simultaneously. Despite the criticism this week Fraser shows no sign of diminished enthusiasm for his plan.

The 830,000 people of Perth will probably have the final say, however. If the election year polls show that they prefer the promise of American protection more than they fear being a potential nuclear target Cockburn Sound could be set to become a major U.S. base.