Secretary of State George P. Shultz, taking on Defense Secretary Caspar W. Weinberger and British Prime Minister Margaret Thatcher, said yesterday that the United States should strike back at terrorists and be prepared to use military force even without assurance of clear victory or total public support.

Without mentioning Thatcher, Shultz labeled as "absurd" her recent contention that international law prohibits punitive or preemptive strikes against states that harbor terrorists.

"On the contrary," Shultz said in comments that aides described as aimed at the British leader, such actions in defense of U.S. citizens would be "strengthening the basis of international stability, justice and the rule of law."

Then, continuing an internal administration debate over the use of covert and overt force in Third World conflicts, Shultz appeared to dismiss several conditions Weinberger has said must precede the introduction of U.S. forces, including assurance of public support and a commitment to victory. The United States, Shultz said, must sometimes be willing to wield military power before a consensus has emerged and when total victory is not an option or a goal.

"We do not have the luxury of waiting until all the ambiguities have disappeared," Shultz said. "I do know we will need the closest coordination between our military power and our political objectives -- because I, as secretary of state, know full well that power and diplomacy must go together."

Finally, as if to reassure his audience at Fort McNair here, Shultz added, "Cap Weinberger and I discuss these issues and these challenges frequently, and we will be working together, in full agreement on the urgency of the problem."

Shultz's speech at a Defense Department conference appears to foreshadow a major administration initiative to resume military aid to the "contra" rebels battling Nicaragua's leftist Sandinista regime. An administration source said yesterday that President Reagan will ask Congress to provide the contras nonlethal and military aid totaling $100 million, up from this year's $27 million nonlethal aid program.

The official said no final decision has been taken on whether any of the aid should be covert.

"A consensus is emerging in Congress that the Sandinistas are not reformers -- or even Sandinistas -- but Leninists who seek a monopoly of power at home and subversion of their democratic neighbors, and who must be stopped," Shultz said in a portion of his text that he did not read.

White House communications director Patrick J. Buchanan and Jeane J. Kirkpatrick, former U.S. ambassador to the United Nations, echoed Shultz's call for a greater willingness to use force. Buchanan said that the nation cannot wait for obvious public support before using force.

"If Abraham Lincoln had waited for that kind of consensus, Fort McNair would today be under the guns of the Confederate States of America," he said.

Kirkpatrick said: "If force is used against us, we must use force in return."

Weinberger initially laid down his cautionary conditions in a 1984 speech, after he and Shultz had tangled over sending U.S. Marines to Lebanon. Pentagon officials said then that the defense secretary was reflecting the views of many military leaders who believe they were unfairly blamed for a failure in Vietnam caused by lack of clear goals and public support.

Two days ago, Weinberger restated his belief that the nation's soldiers "have a right to expect the support of any American government which commits them, and the support of the people."

But Shultz said the government should not always wait for clear signs of support before intervening in the "ambiguous" Third World conflicts that he and Weinberger agree are instigated by the Soviet Union.

"This is the essence of statesmanship: to see a danger when it is not self-evident, to educate our people to the stakes involved, and then to fashion a sensible response and rally support," Shultz said. "We must avoid no-win situations, but we must also have the stomach to confront the harder-to-win situations that call for prudent involvement, even when the results are slow in coming."

Thatcher's remarks on force came in response to recent terrorist attacks in the Rome and Vienna airports, which killed 19 people and which Reagan blamed on Libya. The prime minister said that retaliatory or preemptive strikes could cause "a much greater chaos."

Not so, said Shultz, as he appeared to lay the legal groundwork for possible future action.

"State-supported terror will increase through our submission to it, not from our active resistance," he said. "When the United States defends its citizens abroad, or helps its friends and allies defend themselves against subversion and tyranny, we are not suspending our legal and moral principles."

Shultz predicted a "grim" future if state-supported terrorism is allowed to flourish, with terrorists possibly acquiring small nuclear weapons "devastating enough to destroy a government's leadership and a nation's morale."