President Reagan today paid a bedside visit to Cardinal Terence Cooke, who is dying of leukemia, after praying for the archbishop of New York in a private chapel at St. Patrick's Cathedral.

Reagan, accompanied by his wife, Nancy, and deputy chief of staff Michael K. Deaver, interrupted an afternoon of meetings with U.N. officials and world leaders and detoured two blocks from his headquarters at the Waldorf-Astoria Hotel to see Cooke.

Cooke gave the president a religious medal and presented Nancy Reagan with a cross that he had blessed. Afterward, he prayed with the president--giving the benediction himself--and then talked with Reagan.

According to White House spokesman Larry Speakes, Reagan prayed with an unidentified monsignor before seeing Cooke. Speakes said that they prayed for the nation and that the president recited the 23rd Psalm for Cooke.

Cooke, who serves as military vicar for Roman Catholic chaplains and personnel in the U.S. armed forces, is regarded as one of the most conservative prelates in the United States.

Reagan told Cooke about today's announcement of a cease-fire in Lebanon, Speakes said. Reagan then left the cardinal's residence with a wave to a crowd of several thousand persons gathered behind barricades on Madison Avenue.

Tonight, Reagan spoke to the 47th annual Pulaski Day Parade Dinner at the Waldorf-Astoria, and pledged his "commitment to a free and democratic Poland."

The president reminded the nearly 1,000 people at the dinner of the Soviet Union's downing of a Korean Air Lines jet and said that the Polish people "know all about the brutal [Soviet] regime."

"You know that downing a passenger airliner is totally consistent with a government that murdered 15,000 Polish officers in the Katyn Forest" during World War II, he said.

Reagan said that the Poles' continuing effort to achieve freedom reminds the rest of the world of the "power of ideas and the will to struggle."

Reagan also said the world should be thankful for the strength of Pope John Paul II and said he prays that the pope's "life be protected."