The Treasury Department said yesterday that investment firms, trust companies, pension funds, and securities brokers and dealers, as well as U.S. banks and thrift institutions will be barred from lending to the South African government as of Monday.

But the regulations are expected to have only a limited impact since virtually all major U.S. banks have already announced that they have stopped lending to the South African government. Federal Reserve Board figures released this week show that U.S. loans to the South African public sector were at $217 million as of June 30 of this year, down from $373 million in June 1984 and $623 million in June 1982.

Moreover, U.S. lending to the South African public and private sectors has ground to a virtual halt since September when the South African government, reacting to the rand's collapse on the currency markets, declared a moratorium on debt repayments.

President Reagan, attempting to head off congressional legislation that would have imposed more stringent economic sanctions, ordered a number of limited actions against the South African government on Sept. 9, including a cutoff in U.S. bank loans to the public sector, and bans on most nuclear exports, computer sales to government agencies that enforce apartheid and imports of South Africa's gold krugerrand.

A Treasury Department official said the regulations issued yesterday are a "fleshing out" of the executive order and included a "very broad definition" of financial institutions. Such institutions will be barred from extending trade credits, buying government securities and making indirect loans through third parties..

The Treasury Department will, however, allow limited "case by case" exceptions on loans for educational, housing or health facilities so long as they benefit "all persons on a non-discriminatory basis" as well as loans that expand opportunities for persons "disadvantaged by the apartheid system." Treasury also said the regulations will not interfere with the efforts by U.S. banks in London to work out a rescheduling of outstanding loans in light of the debt moratorium.