Soviet President Mikhail Gorbachev, struggling to shift his crumbling economy to a free-market system, has told officials in Europe and the United States that he needs and would accept economic assistance from the West, although he has not formally requested it, according to informed U.S. and European officials.

The officials said they detected a change in Gorbachev's attitude toward Western assistance as the Soviet Union's economic difficulties have intensified in recent months. In private messages relayed through senior West German officials, they said, the Soviet leader has dropped any objection to direct economic aid and said he would accept it if offered by the major Western democracies.

President Bush said yesterday he remains opposed to extending economic aid to Moscow before "essential" reforms are in place.

Sixteen Senate Republicans and two Democrats, in a letter made public yesterday, appealed to Bush not to provide economic aid to Moscow. "We believe that government-to-government aid would be squandered by the large, inefficient Soviet state bureaucracy," they said. A bailout would be "counterproductive" and would permit Gorbachev "to delay further making the hard choices associated with fundamental economic reform," the senators added.

Administration officials said that Bush, while sympathetic to Gorbachev's plight, would find it extremely difficult to explain Soviet aid to U.S. voters at a time of large federal deficits and talk of a tax increase. The officials said Bush wants to avoid a confrontation on the issue next week when leaders of the seven major industrial democracies take it up in Houston.

West German Chancellor Helmut Kohl, who is seeking to ease Soviet concerns about German unification, has called for a $15 billion program of Western economic assistance to the Soviet Union. The idea has been endorsed by French President Francois Mitterrand, but got a cool response from Britain, Canada, Japan and the United States. Bush is expected to propose technical aid to Moscow as an alternative to Kohl's plan.

Gorbachev emphasized this week that he needs the economic aid now, while the Soviet economy is in the throes of change.

"I should say at this point we need more cooperation, while the government is working out measures for the transition to a market economy . . . to make this process less painful, to make it easier," the Soviet president said in an interview with CBS News Monday after the opening of the Communist Party Congress.

Asked whether he meant immediate aid, Gorbachev replied, "Yes, yes, yes, exactly. We should have some sort of maneuver, most of all concerning an improvement in the economic situation and in the consumer market."

Soviet officials have long been sensitive about asking the West for charity or a bailout. Gorbachev, speaking generally about his push for greater cooperation with the United States at the summit here last month, said it would be "humiliating for the Soviet Union to pass its hat around . . . this is out of the question."

But officials said Gorbachev and Soviet Foreign Minister Eduard Shevardnadze have made it clear they would not reject economic aid such as long-term loans, credits and consumer items. The Soviets have already agreed to a $3 billion package of credits recently offered by West Germany to help pay debts to German businesses. A Soviet spokesman has acknowledged that Moscow, which in the past had an excellent record of paying external debts, is having trouble paying about $2 billion in foreign bills.

Kohl's proposal for a $15 billion Western aid package envisioned a mixture of long-term loans and credits, some joint ventures, and a general assistance program to get Gorbachev through a transition period, with aid to purchase selected commodities in short supply in Moscow, officials said.