ALL THE federal authority to allocate oil in an emergency, and to control its prices, will expire at the end of the month. The Reagan administration said earlier this summer that it has no intention of asking for new legislation. That's the right choice--not because the market can be safely left to handle any conceivable shortage, but because the response is best fitted to the actual circumstances.

The country has been through two oil crises in the past decade, and it's likely that there will be more. When and how bad? No one can say. In a Congress full of lawyers gifted at imagining hypothetical disasters from which to protect their constituents, there is no hope of producing an all-purpose bill to meet every possible contingency. The issues--whether to resort to coupon rationing, how to limit price increases, whether to make refining companies share their oil--touch off profoundly divisive conflicts of ideology and regional interest. But if it's impossible to legislate now for the storm that probably lies somewhere ahead, it is fatuous to say that the market can handle whatever comes.

The Congressional Budget Office published an analysis this week that sets out useful approaches to the next oil crisis. Even a rather small disruption in the flow of oil, the CBO reminds its congressional readers, can have a severely disruptive effect on the American economy. Up to a certain point, the costs of regulatory remedies outweigh the cost of the shortage. The gasoline lines in 1974, and again in 1979, were created by price controls. Most Americans, in limited shortages like those, would probably prefer to let the price rise and pay for the shortage in money rather than in anxiety and time wasted sitting in line.

But it's important to keep in mind that there's a limit. In a greater shortage--one that threatened, say, to double the prices of gasoline and home heating oil--Congress would have to intervene. It would be intolerable simply to let houses go cold, while inflation soared and the drain on incomes translated itself into spreading unemployment. In the direst of cases, an array of special taxes and allocation rules would be indicated, to restrain the sudden redistribution of wealth, the economic distortions and the impact on people's lives. Congress would be wise to keep that CBO study on the shelf, in easy reach--and to remember that if legislation is needed again, it will be needed very quickly.