The nation's economy grew at a 6.5 percent real annual rate during the first quarter of the year, the fastest quarterly growth for nearly three years, the Commerce Department reported yesterday.

The Reagan administration, which is trying to sell a major tax cut to Congress, immediately warned that the economy would soon begin to slow down. Other economists agreed.

Presidential economic adviser Murray Weidenbaum called it a "nice start." But he cautioned that "we should not let results of the first quarter overshadow the fact that inflation and unemployment show little sign of near-term improvement." Commerce Secretary Malcolm Baldridge predicted that the economy would show a "sluggish performance" in the next few months.

News of the first-quarter economic growth, along with an announcement that American Express is discussing a merger with Shearson, Loeb, Rhoades, the nation's second-largest brokerage house, sent the stock market soaring yesterday. The Dow Jones Industrial Average rose 10.36 points to 1,015.94, the highest close in eight years. [Details on Page D6.]

At the same time several more banks raised their prime interest rate half a percentage point to 17 1/2 percent, an indication of the Federal Reserve Board's continued concern over inflation.

The rise in gross national product was powered by increased consumer spending financed out of saving rather than a rise in incomes, by a big improvement in export performance and by more business investment.

President Reagan, anxious to rally support for his economic program of tax and spending cuts, hopes to make a speech on the economy early next week, administration sources said yesterday. The president will aim his remarks at members of Congress returning next week from the Easter recess as they prepare to start drafting tax and spending legislation. It will be his first major public speech since he was shot March 30.

Yesterday the president, who is working four to five hours a day out of the study he is using in the family quarters of the White House, continued his series of phone calls to key members of Congress in support of his economic program. Reagan also called former president Ford to discuss speeches Ford will make to support the program.

The unexpected strength of the economy in the early months of the year could reinforce congressional doubts about the wisdom of cutting taxes as much as, and for as long as, Reagan wants. His three-year plan for 30 percent across-the-board cuts in personal tax rates has proved the most controversial part of his program so far.

Democrats in the House have suggested a smaller, one-year tax bill, which would include a variety of tax cuts for individuals, some of which would be aimed particularly at boosting savings, and some form of faster depreciation write-offs. Reagan also has proposed much more generous depreciation allowances for business.

The first quarter jump in the nation's gross national product, which measures the total output of all goods and services in the economy, followed an increase of 3.8 percent at an annual rate in the fourth quarter of last year. It was the third quarterly increase after last summer's sharp recession.

Some of the improvement in the first quarter came because of a lower reported inflation rate, as people cut down their consumption of high-priced energy. Through the use of an index called the GNP deflator, which measures the price changes of goods people actually buy, the GNP numbers are calculated so as to take out the effect of inflation.

The deflator rose at only a 7.8 precent annual rate in the first three months of the year, the Commerce Department said, partly because energy prices had a smaller weight in the index as people cut back consumption. The deflator rose by 10.7 percent in the final quarter of 1980.

Allen Sinai of Data Resources Inc., a private economic forecasting organization, said yesterday he would not be surprised if the inflation number were revised up and the growth number revised downward in later reports. The "very hefty number" for GNP growth is "not an indicator of the behavior of the economy at the present time," he said yesterday.

Other factors in the growth rate were a rise in personal consumption at an annual rate of 4.7 percent, a leap in business fixed investment at a 9.6 percent annual rate, and a rise in exports after a sharp fall at the end of last year.

Almost all of the elements that helped the economy along in the first quarter have now slowed, Sinai said. "Consumer spending is now stalled out," he said, and auto sales, temporarily boosted by the rebates, have dropped again. He also said that industrial production and housing starts are not strong.

Saving dropped to 4.7 percent of after-tax personal income in the January-March period, the Commerce Department reported. This equaled the low point reached last spring before the imposition of credit controls. However, the latest data on personal incomes showed that saving picked up somewhat in March.