WASHINGTON—The White House gave a politically appointed official the authority to keep aid to Ukraine on hold after career budget staff members questioned the legality of delaying the funds, according to people familiar with the matter, a shift that House Democrats are probing in their impeachment inquiry.

President Trump’s order to freeze nearly $400 million in aid to Ukraine in mid-July is at the center of House Democratic efforts to investigate allegations that Mr. Trump used U.S. foreign policy powers to benefit himself politically. The hold came days before Mr. Trump’s request, on a July 25 call, that the Ukrainian president work with Rudy Giuliani and Attorney General William Barr to conduct investigations into former Vice President Joe Biden, a Democratic presidential hopeful.

Mr. Trump has said he ordered the aid frozen because he wanted European countries to do more to support Ukraine. He has also said he didn’t make the aid to Ukraine contingent on the country’s cooperation in an investigation of Democrats. A rough transcript of the July 25 call released by the White House doesn’t show Mr. Trump explicitly linking the aid to an investigation.

A Justice Department spokeswoman has said the president never asked Mr. Barr to make the call nor did he ask the attorney general to investigate Mr. Biden.

The president has the authority to delay the release of money in certain instances, according to the Congressional Research Service, a nonpartisan research agency, including if there has been an unexpected change in circumstances for the program. But without being provided explanation or justification about why the administration was delaying the aid, some career officials at the Office of Management and Budget became worried they didn’t have the legal authority to hold up the funds, according to the people familiar.