White House officials said yesterday that President Reagan's antidrug program may include mandatory testing of all federal employes, a proposal that was immediately denounced by the largest government union as a "witch-hunt" approach to the problem of drug abuse.

Larry Speakes, White House spokesman, said the president "is looking at the possibilities of expanding" a mandatory drug testing program that now applies to military personnel. "We believe that it is essential that you remove the customer, the user, from the equation," he said.

Reagan supports expanded testing, according to Speakes, but he cautioned that it is only a possibility. "There are certain legal and constitutional questions that are involved, and those are being studied," he said.

Next week, Reagan is expected to announce details of what the White House has billed as a new program to combat drug abuse.

At a news briefing, Speakes said that among the proposals under consideration is the granting of bidding advantages to government contractors who initiate drug programs for their workers.

In addition, Speakes indicated that the president may urge private employers and school officials to institute testing programs.

He emphasized, however, that no new money will be added to the budget to pay for drug programs, despite complaints from state and local government officials that they have insufficient funds to provide treatment for addicts. "It won't mean any more than we have in the budget at the present time," Speakes said.

Loretta Ucelli, communications director for the American Federation of Government Employees, the largest union, said "we oppose what we consider to be the witch-hunt mentality of testing everyone." She said such testing amounts to illegal search and seizure, and the union has already gone to court to bar testing of civilian employes at Fort Lewis, Wash.

Speakes had high praise for the mandatory testing program in the military, contending that it has succeeded in cutting drug abuse rates from 27 percent to 9 percent.

Yesterday morning, Reagan told leaders of civic groups that illegal drugs are "as dangerous to our national security as any terrorist or foreign dictatorship."

He said, "The time has come to give notice that individual drug use is threatening the health and safety of all our citizens. We must make it clear that we are no longer willing to tolerate illegal drugs or the sellers or the users."

"Our object is not to punish users but to help them, not to throw them in jail but to free them from dependency, not to ruin their lives by putting them behind bars but to prevent their lives from being ruined by drugs."

Nancy Reagan presented the Pharmacist of the Year Award to druggist John Hasty, of Hayes, Va., for his efforts against drug and alcohol abuse. The $2,500 award and a $7,500 scholarship contribution were supplied by the Adolph Coors Co., which in 1984 spent more than $38 million on television advertisements for its beer, according to United Press International.