THE AFFAIR of the $5 heating oil subsidy carries two stern lessons. First, it shows the dangers the Carter administration runs when it tries to resolve its domestic oil troubles without concern for the repercussions abroad. Second, it suggests that the industrial countries aren't going to have much luck holding down prices until - together - they find a way to hold down imports of oil.

This latest incident began two weeks ago when the Department of Energy suddenly announced a subsidy of $5 a barrel on imported heating oil. This country has been subsidizing imports with the controlled prices of the domestic supplies. But the $5 subsidy was especially inflammatory because it was a deliberate attempt to increase imports.

The U.S. import subsidies have always seemed to Europeans to be a costly attempt to postpone the real consequences of a worldwide oil crisis. But this subsidy was aimed specifically at the Europeans. The stocks of heating oil in this county are just half the level that the Energy Department considers necessary for next fall, and the department is getting nervous. It defends the subsidy by arguing that the Europeans started the competition by invading the Caribbean to buy heating oil that, in the usual pattern of trade, would routinely have come to the United States.

The European reaction was immediate. Within one day, the price of heating oil on the European spot market had jumped more than $5 a barrel - wiping out any economic advantage conferred by the subsidy. The Common Market bitterly charged that this bidding war was driving oil prices out of sight for everyone. The subsidy "will transfer the problems of the United States market to the other markets of the world," it protested.

This week the French foreign minister, Jean Francois-Poncet, came to Washington to urge restraint on President Carter and call publicly for joint action to hold down oil prices. Then the chancellor of Germany, Helmut Schmidt, arrived with a similar message.

The seven major industrial countries will meet in three weeks in Tokyo. The main question before them will be whether they are capable of taking action to limit oil imports. With American leadership, much would be possible. But American leadership is caught in endless confusion and conflict between the Carter administration and Congress. In the absence of policy, the economics of oil will be left once again to OPEC and the formidable price rises that it is now preparing.