The Senate last night approved a modified version of the Reagan administration's request for $250 million in economic aid to Jordan and said it would consider military assistance if Jordan enters direct peace talks with Israel.

It did so by voice vote after rejecting, 84 to 9, a proposal expressing the Senate's opposition to arms sales to Jordan until Jordan and Israel agree to a peace treaty.

While opponents of military aid contended that the economic assistance could free Jordan to spend more on arms, others argued that the restrictions in the measure were tight enough and cautioned against discouraging peace efforts by King Hussein.

"To add on top of this the proposed restrictions a requirement that King Hussein swear on the Koran that he is not spending a penny on arms is going a bit too far," Sen. Daniel K. Inouye (D-Hawaii) said.

The action on Jordan came as the Senate approved by voice vote a $13.5 billion omnibus spending bill that had also been expected to include a long-sought agreement on cost-sharing for water projects.

The agreement, tentatively negotiated by White House officials and Senate Republican leaders but stymied by objections from Sen. John C. Danforth (R-Mo.) and the barge industry, was aimed at resolving White House objections to a $63 million down payment on about $4 billion worth of harbor, dam and related projects.

However, sources indicated that the agreement would be read into the Congressional Record today, apparently meeting administration demands for assurance that long-term cost-sharing legislation will be enacted. Already in the spending bill were requirements for cost sharing on projects it funds.

The White House had threatened to veto the bill unless an agreement was worked out to shift a major share of water-project costs to local governments and commercial users, even though the measure contained some top-priority administration proposals.

These included $38 million for Nicaraguan antigovernment rebels, known as contras.

Before considering the Jordan aid, the Senate spent most of the day padding the funding bill with assorted home-state projects, ranging from $12 million for a new Army Engineers building in Walla Walla, Wash., to $200,000 sought by Majority Leader Robert J. Dole (R-Kan.) for remote-sensor activities at the University of Kansas.

The Senate also: Approved a proposal to require the Soviet Union to pay more than $20 million in damages for construction delays on the U.S. Embassy in Moscow before the Soviets can occupy their new embassy in Washington. Agreed to give the Central Intelligence Agency $50 million to improve security at U.S. embassies under a plan to be submitted to Congress by Sept. 1. Adopted language providing that U.S. funds for international population programs cannot be used for compulsory sterilization; the bill already banned funding for forced abortions.

The way was cleared for approval of the Jordan economic aid, despite earlier coolness to the proposal, when the Senate Foreign Relations Committee earlier yesterday approved the plan, 14 to 2.

As modified by the committee, the economic assistance would be spread over 27 months, rather than the 15 months that the administration requested.

Although the administration wanted $100 million of the $250 million in cash assistance, the committee barred such aid on grounds it might be channeled into arms purchases, including payments for already purchased Soviet weaponry. Instead, the panel stipulated that all the money had to go for specific projects and commodity imports.

Also stipulated during the floor debate were timetables for disbursement of the funds, coupled with requirements for periodic reports on peace efforts; Secretary of State George P. Shultz agreed to seek a consensus in the Senate before seeking military aid.

Although more than 70 senators are on record against military aid for Jordan, the language approved last night holds out the possibility of such aid "upon commencement of direct peace negotiations between Israel and Jordan." It specified, however, that the aid could not be held hostage in the event of Israeli reluctance to enter peace talks.

The House has approved its own version of the supplemental money bill that includes $27 million for the contra forces in Nicaragua, but without any assistance for Jordan. It also includes $72 million for water projects, without any cost-sharing provisions. Included in both bills is $1.5 billion in economic aid to Israel and $500 million for Egypt.