President Reagan, no stranger to either praise or advice from unlikely sources, is getting a measure of both from a man who has been one of his most unrelenting critics.

"We've necessarily given Reagan hell when we think he's wrong," Jesse Jackson said the other day. "Now it's time to give him credit for two positive steps in the right direction."

Jackson's praise was for (1) the president's unusually firm denunciation of South African apartheid and (2) his encouragement of negotiations with the Cuban government for the return of some 2,500 criminals and mental patients who came to the United States as part of the 1980 Mariel boatlift.

His advice concerned the same two issues. "He's made a good start," Jackson said, "but he must take both matters to their logical conclusion. In the case of Cuba, that means restoration of full diplomatic ties and economic trade. In the case of South Africa, it means moving from a change in rhetoric to a change in direction."

U.S. and Cuban authorities are reported close to an agreement that would have Cuba accept the return of the "excludable" mental patients and convicts. In return, the United States would resume issuing visas that would allow Cuba's political prisoners and their families to emigrate here.

The current round of talks between the two countries is limited to immigration matters. Jackson's advice is that the talks must be expanded.

Cuban President Fidel Castro, with whom Jackson met in June, has already said he would accept an exchange of ambassadors without precondition, Jackson said, adding, "The United States ought to be moving in that direction because then we would have the access that could begin to impact on Central American policy.

"Cuba is the biggest player, and Castro is a hero in that part of the hemisphere. If we don't talk to Castro, we can't compete with the Soviet Union for influence in the region."

But while Jackson believes that America's isolation of Cuba has gained all it can gain, he also believes our relaxed attitude toward South Africa has reached the limits of its effectiveness. He welcomes the early indications that both policies are being rethought.

"President Reagan's moral condemnation of South Africa must be seen as a change in rhetoric and, one hopes, a change in direction. But it's important that the change be taken to its logical conclusion. South Africa can stand one more moral condemnation, but it cannot stand [American] diplomatic and economic reinforcement of that condemnation. We didn't just condemn Cuba or Poland, but we put our political and economic muscle behind it. We must do the same thing with South Africa."

It strikes me as generally good advice. Resumption of official relations with Cuba won't change Castro into a capitalist, and tough U.S. sanctions against South Africa won't turn that country into a model for human rights. Even under the wisest of policies, the United States has a only limited ability to influence the internal politics of the two countries.

But that is a long way from saying that we cannot influence them at all. America has something that both countries covet. For Cuba, it is the prospect of trade and travel that could boost its suffering economy. For South Africa, it is acceptance into the family of civilized nations.

Both countries have given strong hints that they are ready to undertake at least a degree of change. "Negotiations with Cuba and the challenging of apartheid in South Africa are important steps in the right direction for which the Reagan administration deserves praise," says Jackson. "Now he must move from changed rhetoric to changed actions. It's time for the word to become flesh."