The Commerce Department had a modest bit of good news on the international economic front yesterday, reporting that the U.S. trade deficit with the rest of the world narrowed to $6.4 billion in the fourth quarter of last year, resuming a favorable trend that had been interrupted in the third quarter of 1978.

As a result, the deficit for the whole year in the so-called current account -- which includes "invisible" service transactions and earnings of foreign investments as well as merchandise trade -- wound up at $16 billion, or about $1 billion less than recent official estimates.

The trade deficit itself for 1978 amounted to $34.1 billion compared with $31.1 billion in 1977 and $9.4 billion in 1976.

Nonetheless, the current account deficit was at a record high, up marginally from $15.3 billion in 1977. Foreign governments and money market experts watch the current account deficit closely because it is thought to be the most significant indicator of a nation's international financial balance.

It represents the best measure of the international debt that a nation ultimately must finance. The prospect of substantial red ink in the nation's current account was a key element in the weakening of the dollar last year.

Conversely, anticipation that both the trade and current account deficits would be sharply reduced this year has been among factors in the recent strengthening of the dollar in world currency markets.

C. Fred Bergsten, assistant secretary of the Treasury for international affairs, said that despite the modest improvement in the fourth-quarter results, the government for the moment will stick to its forecast that the current account deficit in 1979 will be halved to about $8 billion. It might have been less except for the recent turbulance in international oil markets.

But Bergsten pointed out that the fourth-quarter current account deficit of $1.34 billion -- which works out to an annual rate of only a little over $5 billion -- "occurred at a time when the domestic growth rate was faster than expected."

In the third quarter of last year, the current account deficit had been $3.71 billion, or an annual rate of about $15 billion. And in the first quarter of 1978, the current account deficit had been at the staggering level of $30.3 billion.

That extraordinary current account deficit, in tandem with a trade deficit in the first quarter at an annual level of $45 billion, helped trigger the run on the dollar.

Growing uncertainty over oil supplies in the wake of chaos in Iran, and a wave of price increases organized by various oil-cartel members, are the main reasons why the administration is being cautious on its trade and current account forecasts for this year. Although oil prices clearly have moved up, the Carter administration hopes for an offset through a reduction in the volume of oil imports.