President Reagan said yesterday that the administration has "led the way" in supporting resistance movements in Afghanistan and Nicaragua and that "many of those in the Democratic Party" are dissatisfied with their party's direction on foreign policy.

"Our party has been unstinting in its support of democratic development in the struggle against totalitarianism," Reagan said in an address to the National Republican Heritage Groups Council, an arm of the Republican National Committee that is composed of various ethnic group representatives.

Reagan took credit for helping Afghan resistance fighters one week after State Department officials said that $4 million in U.S. humanitarian aid has been flowing directly to rebels inside Afghanistan for almost a year.

Separately, private groups have estimated that up to $400 million in covert U.S. aid has been funneled through Pakistan to the rebels since the Soviet invasion of Afghanistan late in 1979. The United States has also provided about $300 million in humanitarian aid to refugees in camps along the Pakistan-Afghan border.

The president was not specific about the kind of aid that has been provided to the Afghan rebels, but he coupled it with a statement that Republicans are experiencing a "positive realignment" in domestic politics based on foreign policy.

"Believe me," he added, "in the coming years, freedom and foreign policy are going to be the issues that move the voter, even as they move the world."

Reagan said he is "encouraged by many of those in the Democratic Party who are wondering about a burden that some in their party would have them take on."

He added: "Already many are asking if they really want to be remembered as the party that couldn't support vital weapons programs or the party that, at a critical turning point in the struggle between totalitarianism and freedom, did not aid those struggling to save freedom in their own countries, countries like Nicaragua, from totalitarian rule."

The president said that more Democrats are becoming Republicans "than I can remember at any previous time." He also said that some who won't switch affiliation are voting with the GOP "rather than the objectionism and obstructionism that is coming from the leadership of their own party."

Democrats who voted against his proposals to aid the rebels fighting Nicaragua's Sandinista government "are doing a little rethinking" since Nicaraguan leader Daniel Ortega went to Moscow, Reagan said.

In his 11-minute speech, Reagan also said a "tidal wave called freedom" will "soon roll and crash its way across the desert that is 20th-century totalitarianism."

"Look around the world at the growing insurgencies against repressive rule in totalitarian countries, the revolt of intellectuals against the stale cliches and bogus prophecies of Marxism-Leninism, the steady growth of the power and especially the number of nations that are turning to democracy," Reagan said.

Departing from his prepared text yesterday, the president complained about a "drumbeat of ceaseless propaganda" about defense spending. For example, he said, "that $436 hammer. We never bought that. We're the ones that found out that that's what they'd been asking for, then we didn't buy it."

In fact, the administration has said it did buy a claw hammer at that price and later demanded and received refunds from the contractor.