The House passed the $6.8 billion foreign aid bill yesterday, compromising with President Carter on indirect U.S. contributions to seven countries that are said to be gross violators of human rights.

By a vote of 229 to 195 the House agreed to drop a provision prohibiting international banks from using U.S. funds for loans to Vietnam, Cambodia, Laos, Cuba, Uganda, Mozambique or Angola.

Carter had written the House last week that he would order U.S. representatives on the banks to vote against aid to the seven countries. But be and other administration officials had argued that putting such a ban in the law would jeopardize the operations of the banks, which had said they could not accept the restriction under their bylaws.

The bill now goes to the Senate, which is expected to approve it today, but a minor difference between the House and Senate remained after yesterday's vote.

By a 219-to-188 vote the House refused to accept a Senate provision that would allow the President to waive a ban on direct U.S. aid to Angola and Mozambique if he reports to Congress that such aid would further U.S. foreign policy interests and if both houses agree with him.

If the Senate refuses to rescind its waiver, the bill will go back to conference.

However, Rep. Clarence D. Long (D-Md.), chairman of the Foreign Operations Subcommittee of the House Appropriations Committee, said, "I feel fairly confident the Senate will accept out point of view."

Long said he had conferred with Sen. Daniel K. Inouye, chairman of the Senate Appropriations Subcommittee on Foreign Assistance, after yesterday's House vote.

The vote against direct aid to Angola and Mozambique came on a motion by Rep. C. W. (Bill) Young (R-Fla.), who argued that waivers should not be granted for those countries if they are not provided for nations friendly to the United States.

On the international lending issue, Long said his subcommittee would examine the banks' policies closely and would insist that the World Bank and its affiliate, the International Development Association, notify Congress of any loans to the seven countries.