Four major American oil companies operating here have stopped shipping Libyan crude, but in effect have undercut President Reagan's embargo by "lending" or selling their production to oil companies of other nations, diplomats and industry sources said today.

Libyan, West German, Italian and other oil companies have taken over the roughly 20 percent share of Libya's production involving American firms, according to the sources, who requested anonymity. They said this allowed Libya to maintain its output of 1.2 million barrels per day.

The arrangements technically complied with the president's executive order to end all American transactions with Libya, the sources said, but violated its spirit. This puts the administration in "an embarrassing situation," a source said, following the European Community's rejection yesterday of U.S. demands that its members embargo Libyan oil.

"The net result is that the action of the American companies," a western oil official said, "is having absolutely no effect on Libya's overall income from oil export." Almost all Libyan oil is exported to Europe, Africa and Asia. Now awaiting what the sources termed imminent State Department approval, the deal on passing along production involves Occidental, Amerada Hess, Conoco and Marathon.

Occidental, with the largest installation, confirmed that it is not exporting oil from Libya but a spokeswoman said the company would not comment on shifting of the production to other companies. The State Department also refused comment, and the other companies could not be reached.

Grace, a fifth American oil company that accounts for less than a tenth of the American companies' estimated total production of 240,000 barrels a day here, apparently is not party to the deal.

The American companies' output is known as equity oil, an industry term for those quantities of crude that belong outright to the production company under its basic agreement. Additional quantities belong to Libya or other concession partners.

If the Reagan administration refuses to accept the arrangement, "the effect could be that the Americans would simply have to abandon their Libyan holdings," the sources said, "allowing the Libyans to take over billions of dollars' worth of assets for nothing."

Under the deal's provisions, one industry source said, the four American companies transfer their share of Libyan equity oil to subsidiaries in Britain or "in certain foreign tax havens."

Rather than violate the embargo outright by shipping their equity oil, the companies informed the Libyans they would sell or "loan" their share to non-U.S. firms, the sources said.

Details of recently negotiated "loan" deals were not disclosed, but the sources said a variety of different arrangements had been worked out between the Americans and non-American oil companies.

But, the sources explained, certain European and other companies would lift the American equity share without actually making payment.

Instead, they promised reimbursement by returning an equivalent amount of oil at a later date. The arrangement reminded analysts of similar arrangements that were trademarks of the once all-powerful "Seven Sisters."

They were the major oil companies that divided world oil supplies in times of crisis before the Organization of Petroleum Exporting Countries broke their monopoly starting in 1973.