By traveling a very small political distance on Nicaragua, President Reagan has traveled a very long policy distance. He needed only a few additional votes in the House for military aid to the Nicaraguan resistance. Unfortunately, he got them. With this result he moves from a condition of sinking stalemate to a situation with a whole new and riskier range of possible gains and losses: from a wasting or at best a holding operation to an attack.

Politically, Mr. Reagan had drawn a line in the dust and had been moving a reluctant Democratic-controlled House toward it. Now he has pulled the House across the line: 51 Democrats supported his position against the passionate counsel of their leadership. For the president the arms vote is a political feat, which he celebrates as a triumph of bipartisanship. For the Democrats the vote is a party-fracturing event whose implications will hover over its search for a post-Vietnam identity and its quest for a 1988 presidential nominee.

In foreign policy terms, the United States is now in a strange position. It is newly committed to a war against a government with which it is not formally at war and with which it observes diplomatic relations. It is doing so, moreover, not only with congressional consent but in the noonday sun. No longer is there the slightest bow, as there was when the United States funded the contras early in the first Reagan term, to the discretion once associated with CIA operations.

It may be argued that American support of the contras will be the more potent and constant for having been suspended and then renewed in an intense multiyear debate. But there is a problem here: the president and Congress, the Republicans and the 51 Democrats, are agreed on arms aid but not on its purpose. For Mr. Reagan the purpose presumably follows from his pledge to enable the contras "not just to fight and die for freedom but to fight and win freedom." Others who support contra aid, however, do so without expectation of victory but simply to raise the Kremlin's costs of empire, and still others do so to build a position of strength from which to negotiate more effectively.

The excitement of the turnabout may conceal these fissures for a time. But they are likely to emerge later, especially if things do not go well in the field. Mr. Reagan may then have to face the familiar and fateful dilemma of whether to raise the ante, this time perhaps with a direct commitment of American forces, or to cut his losses. Optimists see the Sandinistas buckling. Realists should start thinking about the choices that the president, plainly, has not been thinking about.