HERE IS to stopping a bad idea before it gains momentum.The preliminary District budget proposal for 1982 -- it takes effect in October 1981 -- would reduce the budget for the city's public libraries by 26 percent. What that means is this: the budget for buying books would be cut in half; six of the city's 20 branch libraries would be closed; a third of the system's 400 employees would be laid off; all but one of the approximately dozen community libraries in shopping centers and public housing projects would be closed; and the main library would be open only two nights a week.

This cut in service would come at a time when public use of the library system is on the upswing. More people are borrowing books, more people are going to the libraries, and those people are spending more time there.

But increased use may not be the best argument for reconsidering such severe cuts in the library system before they become hard-and-fast proposals. Go visit a neighborhood library. See the young people gaining an interest in reading; see them being carried from the city to the far reaches of imagination and knowledge -- possibly into a career or a better life -- with the help of books. And while you are there, note that the reality of many a youngster's life in this city provides little in the way of entertainment or intellectual stimulation that does not come from the library. On your way out, remember, too, that the reading ability of many District children is far below national averages -- to be exact, three grades lower than it should be when they are in the ninth grade.

There is no question that cuts must be made in the city's budget and no doubt that, overall, programs such as welfare and Medicaid are more essential than buying books. But surely, from the point of view of the general welfare, the library system is a close contender for funds. The mayor and city council should think again about what they are doing to the library system.