FROM THE BEGINNING of President Carter's wage-price guidelines last fall, a certain doubt has hung over his threat to enforce them by withdrawing federal contracts. Last month a federal judge here said that the president does not have that authority. Now the Court of Appeals has reversed the earlier decision and ruled that Mr. Carter can indeed withhold contracts to punish guideline violators. But having regained that power, Mr; Carter would be wise not to use it. It's a club that is best left in the closet.

One reason is that the plaintiff, the AFL-CIO, is already on its way to the Supreme Court. But there's a larger and better reason. The guidelines are not mandatory. Yet, by asserting the contract sanction, the president has made them a little more than purely voluntary. He has pushed himself out into a legal limbo in which he has a certain degree of duty to enforce them - but a massive and well-founded reluctance, in practice, actually to try it.

Instead, the White House has repeatedly gone through the most awkward contortions to find, one way or another, that this labor contract or that price schedule, through an infinite variety of obscure and complex calculations, somehow manages to squeeze under the guidelines.

Mr. Carter, the guidelines and the country would be better off if he rendered to a purely voluntary program. He could then name violators without any constraining thought as to how the contract sanction might apply, whom it would hurt or whether it would be effective. He could simply tell the country that certain named organizations are being more piggy than the public interest allows. Public denunciation is the best weapon that he has - more flexible and powerful by far than a contract authority that, in fact, he has never invoked.

The appellate court upheld the president on grounds that the purchasing statute has always allowed the government to pursue broad public purposes. One previous example was the denial, over many years, of federal contracts to companies that discriminated against blacks. It's an interesting argument, but the court evidently felt a tremor of uneasiness as to where it might lead. The majority and two concurring opinions emphasized that they were limited narrowly to this specific case. "Our decision today does not write a blank check for the president to fill in at his will," Judge J. Skelly Wright cautioned. Having won the point, perhaps Mr. Carter has come to the right moment to send the guidelines back to the shop for overhaul. They were originally built for a time of declining inflation, and they now need to be redesigned for the months of unexpectedly high inflation ahead.