After two steep quarterly declines, the nation's economy moved upward modestly in the second quarter, the Commerce Department reported yesterday. The turnaround marked an end to the recession, according to the chairman of the President's Council of Economic Advisers.

Some economists outside the administration, however, disputed whether the 1.7 percent rate of increase in the gross national product in the second quarter in fact means the end of the recession. Even if it does, the economists fear the recovery will be unusually weak.

"Clearly, we have bottomed out of the recession," CEA chairman Murray L. Weidenbaum said. "Things are beginning to turn up."

At the White House, press spokesman Larry Speakes said the news indicates the economy has entered a "transition stage between recession and recovery...a turning zone in the economy situation."

The skeptical private economists noted that the small gain, which came after adjustment for inflation and seasonal factors, was due largely to the fact that business reduced its inventories at a slower rate than in the first quarter of the year. Final sales of goods and services, as opposed to changes in inventories, went down at a 0.6 percent annual rate.

Business investment other than for inventories fell at an 8.5 percent annual rate, and government purchases fell at a 6.4 percent rate. Net exports also fell slightly. Personal consumption spending, which accounts for roughly two-thirds of GNP, rose at a 3 percent rate.

Prices, as measured by the GNP price deflator, climbed at a 5.3 percent rate, up from a 4.3 percent rate in the first quarter, the department said.

The Commerce report notwithstanding, economist Alan Greenspan, who was CEA chairman in the administration of Republican president Ford and now heads his own consulting firm, cited the continuing drops in some other indicators and declared, "The overwhelming evidence for the April-June period is that the recession continued . . . . Whether the statistics we use to measure it appropriately capture that decline is another question."

Lawrence Chimerine, head of Chase Econometrics, an economic forecasting firm, said the GNP estimate means that "temporarily we've reached bottom. But whether the recession really has ended depends on the future. It's a very small increase, a small increase from a very depressed level. Some sectors of the economy are still declining."

"Hopefully, we'll start moving up," Chimerine said. "But that certainly isn't guaranteed."

Jerry J. Jasinowski, chief economist for the National Association of Manufacturers, was more sanguine. The second quarter figures "are a pleasant surprise . . . . This is clear evidence that the recession is ending," he said, though he cautioned that recovery in the hard-hit manufacturing sector "will be slower than for the economy as a whole."

Weidenbaum, testifying before the Senate Banking Committee, said that he expects the economy to expand more rapidly in coming quarters but that a stronger recovery still "depends on how fast interest rates come down." He went on to endorse fully the policy of continued monetary restraint outlined for the committee the day before by Federal Reserve Chairman Paul A. Volcker, which Weidenbaum said "will result in lower interest rates."

As they did with Volcker, several Democratic members of the committee complained bitterly to the CEA chairman about the state of the economy, including the highest unemployment rates since the 1930s, and urged policy changes to improve it. "I don't see things getting better in the country," Sen. Alan J. Dixon of Illinois told Weidenbaum. "I respect your opinion but I don't see things getting better. I hope you're right, because next year is going to be too late" to change policies.

The CEA chairman rejected the calls for a switch in policy, including Michigan Sen. Donald W. Riegle's proposal that President Reagan convene a "summit meeting" with congressional leaders and Volcker to pin down specific ways to reduce future federal budget deficits. "I think it is quite clear that the worst of the economic problems you describe are behind us," Weidenbaum asserted.

The administration's present program will produce both high levels of economic growth and employment, Weidenbaum said. At the same time, he acknowledged that for the moment the recovery is moving very slowly.