A warning of deep trouble in Congress for any new Panama Canal treaty was politely but cooly handed to President Carter on Wednesday by two impressive sources: the No. 1 Democrat in the Senate and the No. 1 Republican in the House.

Sen. Robert Byrd, the Senate Majority Leader, and Rep. John Rhodes, the House Minority Leader, were at the White House for a 90-minute foreign-policy briefing from the President, whose quiet discourse was abruptly shattered when Byrd issued a blunt warning. The White House and State Department, he said, had better start to work on the Senate if the new treaty is to have any chance of gaining the two-thirds majority required for ratification.

Byrd warned Carter that if a vote were held today on any treaty that substantially changed the current rules fo total U.S. control of the waterway, it would unquestionably be defeated.

As Carter was digesting that warning, the second blow was tossed by Rhodes, who startled the President by saying that he faced a similar problem in the House.

The treaty itself will not come before the House, but what Rhodes called "subsidiary" issues - including that transfer of lands from U.S. to Panamanian ownership - would have to be approved in the House. Although that would take only a majority vote, the House is far more hawkish on the question of changing the status of the panama Canal than the Senate.

Judging from the alarmed reaction to Rhodes's warning, the Carter administration was obviously unaware that the House would be involved in any way in a new U.S.-Panama agreement over the canal. "What Rhodes said hit everyone like a thunderbolt," one of the congressional leaders who went to the President's briefing told us.

What may be the semifinal round of negotiations on the treaty is now under way here, but lack of preparation of Congress for an eventual loss of U.S. control over the canal is definitely hurting the treaty's chances. Ambassador Ellsworth Bunker, the senior U.S. diplomat who began the negotiations in the Nixon administration, is highly regarded on Captiol Hill, but Carter's assignment of Aol Linowitz, a liberal, as his top man on the new treaty weakened the negotiations in the eyes of congressional conservatives, however unfairly.

A footnote: Carter surprised his congressional audience when he cited the attack on him by Tass, the Soviet news agency, the day before the White House session. The President said it proved that Moscow was "feeling the heat" from "world" criticism of its human-rights violations. He carefully refrained from giving the Carter administration's human-rights crusade any credit and said that Soviet concern over its human-rights violations had been achieved without any "internal interference" in Soviet affairs.

Defense-oriented senators who fought to defeat Paul Warnke as chief U.S. nuclear-arms negotiator are quietly reminding the Carter administration that the March 9 Senate vote concealed anti-Warnke sentiment far higher than the 40 votes cast against him.

A careful study of the 58-to-40 vote that confirmed the controversial Washington attorney shows that at least nine senators - eight of them Democrats - who usually vote strongly with the defense bloc voted for Warnke as chief negotiator in the strategic arms limitation talks as a concession to Carter.

That means a minimum of 49 senators, far more than the necessary one-third, would almost certainly line up against any Warnke-negotiated SALT II treaty perceived by the defense bloc as risking U.S. security.

Anti-Warnke senators who have analyzed that March 9 vtoe now believe that Carter had to "twist a lot of arms" to hold the anti-Warnke vote down to 40 senators - sign of the Senate's low, regard for Warnke. The analysis shows all or most of the following senators would stay with defense-oriented Senate leaders if there is a treaty show down with President Carter: Lloyd Bentsen, James Eastland, Ernest Hollings, Wendell Ford, Robert Morgan, Russell Long, Bennett Johnston and John McClellan, all Democrats, and Republican Milton Young.

To win his other hat, as head of the Arms Control and Disarmament Agency, Warnke was easily approved. Of the nine defense-oriented senators who stayed with the President despite deep reservations, only McClellan opposed Warnke as director of ACDA.