Suddenly, although it seems to have escaped President Reagan's attention, the rest of the nation has caught up with the fact that the United States, which used to be a big creditor, has become a big debtor. It's a blow to the national ego, for it means that, like Mexico, Brazil and other countries we used to denigrate as banana republics, we owe the rest of the world more money than they owe us.

This seemed to be news to a confused President Reagan. Responding to a reporter at last week's televised press conference who asked if he found the nation's new debtor status disturbing, the president questioned the assumption that we had become a debtor nation.

To be sure, comparisons with Mexico and Brazil can be carried too far. As New York Federal Reserve Bank economist Shafiqul Islam pointed out in e telephone conversation, their debt is being accumulated in foreign currencies, and as the value of the dollar soared, their real costs of payback climbed. American debt is denominated in our own currency, and as the dollar falls -- as it inevitably must -- the risk of carrying the debt is transferred to the lenders.

There are other differences, including the basic strength of the U.S. economy: Foreign investors are still willingly accumulating assets here for that reason. But the U.S. foreign debt can't continue to go up this way forever. Islam, like his boss, New York Federal Reserve Bank Chairman Gerald Corrigan, and Fed Chairman Paul A. Volcker, agrees that the trend is unsustainable.

Like other debtor nations, we ultimately will have to pay the bill. In essence, the money we have been borrowing abroad has been financing a consumer boom in everything from high-style fashions to fancy cars. At some time in the future, Americans will have to cut back their standard of living to pay off debt.

The trade deficit is only part of the problem: It used to be that the United States could run a trade deficit, but would earn so much on its investments abroad that the "current account" would be in balance. The current account -- the overall measure of our international balances -- includes not only merchandise trade, but also income on investment and other services.

The key to the conversion of the United States from creditor to debtor status is the enormous federal budget deficit. High interest rates triggered by the budget red ink have attracted a huge inflow of capital from abroad. This resulted in a buildup of foreign assets here that is now greater than the assets that Americans own abroad. The nightmare we now face is a vast deficit on investment income.

The available data are somewhat inexact, but the United States owns about $1 trillion in assets abroad, and foreigners own slightly more than $1 trillion here. The trouble is that the foreigners are now adding to their holdings the equivalent of our annual current account deficit. These assets -- everything from factories and real estate to bank balances -- yield their owners dividends and interest: The more foreigners own here, the greater their net earnings that flow out of the country each year, adding to the current account deficit. Thus, the foreign deficit builds on itself.

We edged over the brink into debtor status sometime in March. But it didn't become a worthwhile graphic for the 7 o'clock news until the Commerce Department announced last week that the United States had slipped about $35 billion into the red at mid-year, after being about $28 billion in the black at the end of 1984.

This swing of $63 billion or so represented a "current account" deficit over the first six months of 1985.

Since there is likely to be a similar current account deficit in the second half of this year, the debtor-nation status at the end of 1985 will be about $100 billion. (Brazil's is about $105 billion; Mexico's, $95 billion.) McGraw-Hill has come up with a figure of $387 billion for our external debt in 1987. Corrigan's guess for 1990 is $500 billion, and C. Fred Bergsten of the Institute of International Economics raises the ante to $1 trillion by the end of the decade (at which time, by the way, Japan would be a creditor to the tune of $400 billion).

Much of this is old hat to readers of this or other leading newspapers. In a Business section article March 24, I wrote: "Because the United States has been importing more goods and services for the past three years than it has been able to export, it has become an international debtor nation for the first time in 65 years."

The most worrisome thing is that President Reagan does not seem to understand the negative consequences of foreign investment. He welcomes capital flows from Europe and Asia as a tribute to the success of Reaganomics, and, up to a point, it is true that the American economy has looked attractive to foreign investors. At the same time, the inflow of funds is what has pushed the nation into debtor status.

The unknown is when debtor status will begin to bite individuals' standard of living. The probable scenario, according to the Congressional Budget Office, is that, as foreigners see the United States move into first place on the debtors' list, they will begin sensibly to cut back on the dollar assets they want to hold.

"As capital inflows slowed, or ceased entirely, domestic interest rates could rise, perhaps sharply, and growth in the federal debt could become explosive," the CBO reported.

The urgent answer to the problem is a dramatic cut in the budget deficit that will gently drop the overvalued dollar, curbing both the trade and current account deficits, and slowing the headlong plunge into external debt. This, rather than tax reform or senseless protectionism, should be the No. 1 priority for the president and both parties in Congress.