President Reagan, breaking with congressional efforts to forge a compromise on the budget, vowed last night to veto any tax increase during the next two fiscal years and any spending bills "that would rekindle the fires of inflation and high interest rates."

Continuing on a confrontational course with Congress that could carry over into the 1984 election campaign, the president said in a statement opening his 17th formal news conference that, "The American people didn't send us to Washington to continue raising their taxes, spending more on wasteful programs or weakening our defense.

"It is time to draw the line and stand up for the American people," Reagan said. "I will not support a budget resolution that raises taxes while we are coming out of a recession. I will veto any tax bill that would do this."

Congressional Democrats earlier had accused Reagan of distorting the truth in blaming Congress for high budget deficits. House Majority Leader James C. Wright Jr. (D-Tex.) called Reagan "the biggest alibi artist ever to serve in the White House." Details on Page A6

Reagan appeared relaxed and confident yesterday as he answered 24 questions on a wide range of subjects during a 34-minute nationally televised news conference in the East Room. In contrast to his performance during a May 4 interview in the Oval Office, when he frequently seemed to be groping for answers, Reagan generally appeared to be in command of subjects ranging from education to the situation in the Middle East.

Many of his answers last night were crisp one-liners, some of them rehearsed in what officials said was four hours of preparation Monday and yesterday.

Asked why his administration didn't openly support the 7,000 guerrillas who are in armed rebellion against the leftist Sandinista government of Nicaragua, which Reagan frequently has criticized, he replied, to laughter in the press room, "Why, because we want to keep on obeying the laws of our country, which we are obeying."

In his discussion of the situation in Central America, the president offered no new policy departures. But he did underscore his abiding opposition to the Sandinista government, which he said was helping leftist guerrillas in their attempt to overthrow the government of El Salvador. Disclaiming any desire to overthrow the Sandinistas, the president said that the "only objection we have to them is that they're not minding their own business."

"All we've said to Nicaragua, and from the beginning, is 'Become a legitimate American state. Quit trying to subvert your neighbors. And we'll talk all kinds of relationship with you,' " the president said.

Asked why he pardoned Watergate burglar Eugenio Martinez last week, Reagan said, "He had never committed a crime of any kind before. He was not, in any way, a ringleader or a great activist in the deed performed. He served his sentence, and since that has lived up to the letter of the law and been a very fine productive citizen, and those are the terms for pardoning someone. So, we pardoned him."

However, on this answer, Reagan was not precise when he said he had not turned down the requests for pardon of two other convicted Watergate figures, Jeb Stuart Magruder and E. Howard Hunt.

Reagan said he had received no recommendation from the Justice Department for other pardons. White House spokesman Larry Speakes said afterward that Reagan had received a Justice Department recommendation that pardons not be granted.

On civil rights, Reagan said that his administration has done 21,000 inquiries into Voting Rights Act violations, but a Justice Department spokesman said last night that Reagan was not exactly correct.

Thomas M. Stewart, associate director of public affairs for the department, said 21,000 responses have been made by jurisdictions required to submit any changes in voting procedures to the federal government because they are covered by the Voting Rights Act.

"Each one of the 21,000 changes was closely evaluated and assessed as required by the law," Stewart said, "but that is not to say that we went out on our own and found 21,000 cases . . . . "

Reagan also said, as evidence of his efforts on behalf of black Americans, that his administration has set a record for regaining money for persons denied fair wages. Stewart said he was not certain what the president was referring to, and said Reagan's remarks would have to be studied to see if they can "match up what he said with what he might have meant to say."

Reagan dealt deftly with political questions, both during his formal news conference and immediately afterward, when reporters questioned him as he left the room.

After Reagan had delivered a long defense of his administration's record on civil rights, arguing that "a pretty good hatchet job has been done on us" on this issue, a reporter observed that this and some other statements he made recently "have the markings of a candidate who, indeed will run for reelection."

"Are you trying to tell us something or are we misreading you?" the reporter asked, causing general laughter.

"This is a decision that is not going to be made yet," Reagan said, adding that he still would "be very vocal in a campaign" and support Republican candidates "to the best of my ability" no matter what his status in 1984.

Leaving the East Room after the news conference, the president was asked again whether he would seek a second term.

"I can't answer any of your questions without putting my foot in it," Reagan said with a smile. He added that Calvin Coolidge had once commented, "I never got in trouble for what I never said."

On foreign affairs, Reagan continued to express optimism about the eventual withdrawal of foreign forces from Lebanon despite the refusal of Syria to pull out its troops.

" . . . I can't believe that the Syrians want to find themselves alone, separated from all of their Arab allies," Reagan said.

He declined, as he often has in the past, to put a deadline on the withdrawal from Lebanon of the multinational force, of which U.S. troops are a component. It could be, he said, "that the multinational force will be there for quite a period."

Reagan added, however, that he hadn't "seen any sign" that the size of this force will have to be increased.

The president was asked whether he intends to lift the embargo against the supply of F16 fighters to Israel, imposed in retaliation for the use of U.S. planes in the invasion of Lebanon. Reagan said this was a matter of consultation between the State Department and Congress, a process that he said now is about to begin. Speakes said consultations that could result in lifting the embargo will begin this week.

Reagan also strongly defended his attempts to negotiate a long-term grain agreement with the Soviet Union, drawing a distinction between the selling of grain to the Soviets for cash and helping them build the natural gas pipeline to western Europe. Reagan strongly but unsuccessfully opposed the pipeline help.

He indicated that the dispute between the United States and its allies over this is a thing of the past, saying, "There is peace among us with regard to East-West trade."

Reagan skirted the issue of whether the Soviets actually have violated arms control treaties by testing two new nuclear weapons. He said, as he has before, that the United States has information that such violations may have occurred and has asked the Soviets to respond.

"So far, they have not provided that information to us," Reagan said. "So, all we can tell you is that we have very great suspicion, but again you can't go to court without a case and without the solid evidence. And it's just too difficult and we don't have that."

One of the longest answers of the news conference was to a question about whether the federal education budget should be increased in reponse to a report that American educational performance is declining. Reagan gave a vigorous and statistic-laden exposition of his view that education is primarily a local rather than a federal responsibility.

He said the United States has "created the greatest public school system the world has ever seen, and then we have let it deteriorate. And I think you can make a case that it began to deteriorate when the federal government started interfering in education."

Reagan strongly endorsed the "return-to-basics" formula for improving education and said that many of the problems "can be corrected without money."

"It also takes required courses, in English, in the basics, in mathematics, in science, particularly in high school," Reagan said. "And yet we've seen a time in which you can get credits toward graduation for cheerleading, in some of our schools. Or how would you like to graduate by getting straight As in bachelor life?"

Questioned about a poll suggesting that Americans favor government protection of consumers, Reagan said, "As you know, I'm a Johnny-one-note on this," and repeated his long-expressed belief that such rules can be done better by a lower level of government or a private group such as the Better Business Bureau.

Reagan was asked about a series of allegations involving alleged conflicts of interest or nepotism by officials of his administration. He said they had not been proved and that "everything turned out all right."

He dismissed allegations of nepotism at the United States Information Agency, where several children of high administration officials have been hired, by saying "the young people who were hired were hired because they were eminently well qualified for the jobs."

"Nepotism, in my line, would be if the person in charge was . . . hiring his own relatives," Reagan said. "And there's been nothing of that kind going on."

Reagan again refused to say whether he intends to reappoint Federal Reserve Board Chairman Paul A. Volcker when his term expires in August.

But he predicted that budget deficits in the range of $200 billion would not force interest rates higher and threaten the economic recovery.

"As a matter of fact, in the very near future, I think we are going to see a further drop in interest rates," Reagan said.

The president's declared determination to use his veto power to block any tax increase in the next two years and to hold down domestic spending marked a departure from his practice of the last two years in using the congressional budget resolution as a tool to achieve his fiscal goals. Now, Reagan appears to be abandoning a cooperative approach to Congress to adopt a confrontational position.