Hit by a big drop in oil imports, the nation's merchandise trade deficit fell to $1.851 billion in July, its lowest level since May 1977, the Commerce Department reported yesterday.

The value of imports, including insurance and freight charges, fell from $20.92 billion in June to $19.93 billion last month. Oil imports fell by $1.2 billion as the recession and high prices for petroleum products continued to hold down demand for them.

Exports, not including insurance of freight, also dropped from $18.64 billion in June to $18.08 billion in July.

The department is prohibited by law from reporting imports on the same basis as exports -- that is, without insurance and freight charges included -- except after a 48 hour delay. On that basis, which was widely used until the law became effective this year, the July trade deficit likely was less than $800 million, analysts said.

Many economists, including those in the Carter administration, have predicted that highere crude oil prices would mean an increase over last year's deficit, which was $39.48 billion with imports valued the same way as in yesterday's report.But the sharp drop in the volume of oil imports has brightened that picture.

Commerce Secretary Philip M. Klutznick noted that oil imports in July were the lowest for any month in the last four years. "The average number of barrels imported over the past four months is almost 50 million barrels per month below the average for 1979 and 35 million per month below the first quarter of 1980," he said.

Meanwhile, other economists, including some at Chase Manhattan Bank, are predicting that the growing U.S. surplus in its foreign trade in services and its income from direct investments in other countries will more than offset the merchandise trade deficit. Foreign transactions including these items are summed up in what is known as the balance on current account.

Chase's Economics Group recently declared, "The U.S. balance on services and investment income -- the 'invisibles' account -- is in substantial surplus, and the size of this surplus has been growing rapidly. Since 1975, services and investment income has been growing 50 percent faster than the value of merchandise exports.

"Last year, the 'invisibles' surplus exceeded $35 billion. This year, despite the slowdown in the growth of foreign earnings of U.S. business, it could reach $39 billion," the economists said.

This improvement should produce a surplus on the current account of about $2 billion, the first such surplus since 1976, they concluded.

For the first seven months of 1980, the value of U.S. merchandise exports was $125.98 billion compared to $149.43 billion for imports, Commerce said. The trade deficit of $23.45 billion was up from $19.70 billion in the same months of 1979.

In July, the United States had a $1.50 billion surplus in trade of agricultural commodities and a $1.31 billion surplus in manufactured goods even with imports valued on the cost-insurance freight basis. The deficit for petroleum was $5.44 billion.