Treasury Secretary Michael Blumenthal ended a hastily arranged two-day visit to this capital of Romania today that, in a quiet yet dramatic way, injected the United States into perhaps the most important quarrel within the Warsaw Pact in a decade.

Blumenthal spent 90 minutes in private talks here this moring with Romanian President Nicolae Ceausescu, the independent-minded chief of state and Communist Party leader. Ceausescu startled the Kremlin and the rest of the Soviet Bloc in recent weeks by publicly rebelling against Soviet pressures to increase military spending and to place his country's armed forces under more centrallized Warsaw Pact control.

Blumenthal was sent here by President Carter in an effort -- welcomed by the Romanians -- to show American support for Ceausescu's latest and perhaps most important display of foreign policy independence from Moscow.

Blumenthal's visit, arranged within the alst few days, took on even greater meaning because just Thursday he was in the Soviet capital heading a U.S. Soviet commission attempting to improve trade between Moscow and Washington.

Asked today if he thought his sudden detour to Romania so soon after Moscow might destroy whatever was accomplished in the Soviet capital, Blumenthal told reporters, "I see no inconsistency there at all. We believe it is possible and desirable to seek good bilateral relations with all countries."

Privately, Western diplomats suggest that the United States and the Romanians are still unsure of what, if any, countermeasures the Soviets may impose. U.S. officials said, however, that they did not expect the White House decision to send Blumenthal here to have any effect on the crucial strategic arms limitations talks that are now in a final phase and are the most reliable bellwether of U.S.-Soviet relations.

In fact, Ceausescu is understood to have told Blumenthal in their private talks that Brezhnev and the top Soviet leadership were sincere in their desire for a SALT agreement, that there were others at senior levels who were less open to taking risks, and that Brezhnev would be better to deal with than anyone else.

Senior officials on the Blumenthal journey said that during the private talks with Ceausescu, Blumenthal discussed the prospects of increased economic relations between the two countries. This discussion was not put in the context of increased U.S. aid if the Soviets crackdown on Romania, but by implication this could have been interpreted along those lines by the Romanians, these sources said.

Ceausescu reportedly told Blumenthal that he did not expect Soviet economic sanctions. The Romanian economy is in bad shape and Ceausescu, in a deft political move, linked his public rejection of Soviet demands for higher arms spending to the country's domestic economic problems.

Although Romania is still dependent on the Soviets for several raw materials, it no longer imports crude oil from Moscow and has cut its percentage of foreign trade with the Kremlin from 40 to about 18 percent.

The fact that Blumenthal came here rather than Secretary of State Cyurs Vance was, in part, coincidence. Blumenthal happened to be already in Europe and Vance is heading for the emiddle East. The assignment thrust the treasury secretary into an unaccustomed diplomatic role at a tense time in internal Soviet Bloc relations.

By outward appearances, his visit was warmly received, however, the Romanians were very low key in an apparent effort not to further provoke Moscow.There were no official welcoming or departure statements by Romanian officials. Blumenthal, howeve, repeatedly emphasized the White House theme of how important relations were between the two countries.

Asked about the message he said he carried here from President Carter, Blumenthal said the president had asked hi mto tell Ceausescu "how greatly he values the relations that were established" during the Romanian leader's visit to Washington in April.

The trip here at this particular time has all the earmarks of the administration policy, engineered primarily by Carter's national security adviser, Zbigniew Brzezinski, to treat the members of the seven-nation Warsaw Pact in varying ways, depending on their policies toward the Kremlin and the United States.

Despite its maverick foreign policy stance, Romania, unlike Yugoslavia, has remained inside the Warsaw Pact and there is no indication either that it is setting the stage for leaving that pact or will be forced out. Unlike Yugoslavia, Romania shares a long border with the Soviets and serious political trumoil here could quickly involve the Soviet Bloc. Reports that there were some Soviet troop maneuvers in Hungary, near the Romanian border, during Ceausescu's recent speech making proved incorrect, officials said.

Unlike Czechoslovakia, which was invaded by Soviet-led forces in 1968 when the liberal government it had at the time appeared to be straying from Soviet Communist Party domestic principles, Romania remains firmly in the Communist camp ideologically.

Romania is about as tightly controlled a police state as the hardest-line boloc countries, yet there is no indication that there was any discussion of human rights in Romania during the Blumenthal visit.

Amnesty International, the human rights organization, recently published a lengthy report alleging numerous human righs violations here.

Ceausescu's outspokenness, meanwhile, is having serious political repercussions throuthout Eastern Europe, in the view of many specialists.

On one hand, the Romanian leader's open stance has put Communist leaders in other countries on the spot. Ceausescu's description of new military expenditures as "unnecessary" and "a big mistake" and his statement that there is "no immediate danger of war" will undoubtedly cause people in those other countries to ask if their own leaders are being cowed by Moscow into increasing military expenditures at the expense of domestic development.

On the other hand, the Romanian leader is expressing a problem that is afflicting all bloc countries, but one that the leaders in those countries cannot express.

Romania, however, is the only Warsaw Pact country that has no Soviet troops or military advisers on its soil, which makes rebuking Moscow on certain foreign policy questions somewhat easier than it is for others.

After the two days of talks here, the general U.S. assessment was that the Ceausescu government was remaining calm and was not anticipating any great threat or dire consequences.

The Romanians, officials said, seem intent upon retaining their independence on the defense issue and their friendly ties to Moscow's archrival, China, and to Gyptian President Anwar Sadat.

The impression was gained here, government sources said, that the Soviets are using the Chinese threat more these days to sustain their own defense budget, as the more traditional adversary to the West -- Germany -- becomes a less convincing enemy.

The pressure on the Soviet Bloc countries to spend more for defense, presumably with Soviet arms factories, fits into that pattern. That is also why Ceausescu's friendliness toward China irks Moscow doubly.