House and Senate conferees approved a foreign aid appropriation bill late Wednesday night that gives the Carter administration most of what it wants both dollars and discretion.

The conferees' action represented an important victory for months ago, the mood of Congress seemed to be running strongly against foreign aid. But the chances now appear good that both houses will approve the $9.1 billion conference report that one administration lobbyist described yesterday as "a damn good bill."

The key fight Wednesday night involved the administration's insistence that it be able to give Syria $90 million in aid. The Senate had approved this, but the House deleted all aid for Syria to protest that nation's hardline position on the Middle East peace negotiations.

Compromise language drafted by Rep. Matthew F. McHugh (D-N.Y.), instructing President Carter to aid Syria "only if the president believes" that such aid would "serve the process of peace in the Middle East" was eventually approved by the conference.

The conference also deleted all specific restrictions on aid to named countries that the House and Senate had earlier adopted. As a result, Carter will have the option if the legislation gets final approval to give U.S. aid to Mozambique and Angola in Africa or Nicaragua in Latin America, among others.

The only area in which the administration failed to get what it sought was in U.S. contributions to the World Bank and other multilateral aid institutions. Congress continues to appropriate substantially less for these institutions that the United States has promised to contribute, and sometimes less than Congress itself has authorized.

But even here administration officials pronounced themselves satisfied with the conference committee's actions, which gave these institutions about $100 million less than the Senate voted, but substantially more than the House approved.

The House conferees also accepted a $1.8 billion U.S. contribution to the "Witteveen facility," a new fund coordinated by the International Monetary Fund and financed largely by contributions from major oil-producing nations to help poorer countries cope with the consequences of higher oil prices since 1973.

In return for their support on this matter, House conferees insisted on funding for the operating expenses of the Agency for International Development, which ended up with more money than had been expected. This added money will go to salaries and expenses within the organization, however, not to poor nations overseas.

On aid to Syria, the White House made an all-out effort for the $90 million it had requested, overriding even the State Department, which had earlier indicated a willingness to compromise at $60 million. After the Camp David summit, according to official sources, Carter himself decided that the full $90 million was crucial.

Besides Vice President Mondale, Defense Secretary Harold Brown, Secretary of State Cyrus R. Vance, and national security affairs advisor Zbigniew Brzezinski joined in lobbying the conferees Wednesday afternoon and evening on behalf of the Syrian money.

The conferees' final bill also includes $35 million for Greece, a contribution proposed in Congress as a form of compensation for the earlier decision to lift the arms embargo against Turkey.