Hungary this week will become the second Soviet-bloc nation to join the International Monetary Fund, and Romania, already a member, has been advised that it can resume borrowing from the IMF after a five-month suspension, it was learned yesterday.

The developments provide an important psychological as well as practical boost to the two communist countries, both of which have been under financial strain.

The IMF action will give the countries access to fresh sources of medium- and long-term financing. Perhaps equally important, the IMF's actions are expected to help restore western bankers' confidence in the Hungarian and Romanian economies and increase the likelihood of their obtaining commercial loans.

The bankers' confidence in the credit-worthiness of communist countries was shaken last year when Poland, and later Romania, proved unable to keep up with payments on their debts. It has been all but impossible for them to obtain western loans for months, but some bankers have indicated privately that IMF support could be a signal to resume more normal financial relations.

A high-level Hungarian delegation, led by Deputy Prime Minister Jozsef Marjai, has been in this country for several days to meet with bankers and U.S. government officials.

On Thursday, Marjai is scheduled to sign a certificate of agreement at a ceremony at the State Department that will make Hungary the 146th member of the international institution.

The IMF's executive board is expected to meet Wednesday to give formal certification to Hungary's application, after several weeks of voting by members.

Although the Reagan administration has made no announcement of its position on the Hungarian IMF application, sources said yesterday that the United States supports it. This marks a continuation by the administration of a longstanding American policy of treating East European communist countries differently from the Soviet Union.

In 1973, when Romania became the first Soviet-bloc country to join the organization, the United States approved.

In contrast to the support being shown for Hungary, the administration imposed economic sanctions against the Soviet Union in December in retaliation for its "participation" in the martial-law crackdown in Poland.

Some U.S. companies affected by a ban on the sale of equipment for use in the Soviet natural gas pipeline have urged President Reagan to relax these sanctions.

But this week a resolution is due to be introduced in the Senate urging the president to "prevent U.S. corporations, foreign subsidiaries, manufacturing associates or licensees from participating in the construction or financing" of the pipeline being built from Siberia to Western Europe.

A resolution to be submitted as an amendment to the defense authorization bill by Sens. Jake Garn (R-Utah) and William L. Armstrong (R-Colo.) describes the pipeline as an "intolerable threat" to the security interests of the United States and Western Europe.

Senate sources said the Soviet Union wants to circumvent the U.S. sanctions by obtaining the turbines from a French company, Alsthom-Atlantique, which is licensed by General Electric to make the parts. General Electric is forbidden by the sanctions from supplying components made in the United States.

Western economic analysts have high praise for Hungary's financial management. Although the country has a debt to western banks of $6.8 billion, it has reserves of close to $2 billion and has continued to pay its debts promptly despite recent difficulties obtaining financing.

They are more concerned about Romania. In November the IMF suspended access by Romania to a $1.3 billion credit line in part because Romania was falling behind in paying western companies and banks and had failed to carry out certain economic reforms.

Romanian officials are attempting to refinance $2.3 billion of debt due to more than 300 western banks this year.