“When push comes to shove, on the very hardest calls that confront a president, you want the president’s adviser to remember that their oath or affirmation to the Constitution comes first, before family ties,” Mr. Eisen said. “You need to be able to say no. You need to be able to hold the line. You need to be able to threaten to resign, and you need to be able to actually resign. You can’t resign from being somebody’s son-in-law.”

Image Prime Minister Shinzo Abe left Tokyo on Thursday, headed to New York for talks with president-elect Donald J. Trump. Credit... Kazuhiro Nogi/Agence France-Presse — Getty Images

Richard W. Painter, an ethics counsel to George W. Bush, said he remembered having to inform a senior official serving Mr. Bush that he was legally barred from granting a White House internship to his son. Mr. Painter based his decision on a reading of the anti-nepotism law by the Justice Department’s Office of Legal Counsel during Jimmy Carter’s administration, which barred the president from doing so for his own child.

“I told him: ‘Jimmy Carter couldn’t do it. If the president of the United States couldn’t do it, I can’t do it for your kid,’” Mr. Painter recalled. “I got cussed out.”

Mr. Trump could try to circumvent the law, the lawyers said, by arguing that he has broad executive authority as president to choose his advisers. But that move would probably invite a legal challenge, forcing a court to decide whether the president’s executive authority to choose his advisers takes precedent over a law passed by Congress that bans nepotism in the government.

Mr. Trump could also try to invoke the example of Hillary Clinton. A 1993 decision by the United States Court of Appeals for the District of Columbia Circuit held that Mrs. Clinton, whom President Bill Clinton had appointed to lead his health care task force, was acting as a full-time government employee and therefore the panel could shield its meetings and records from the public. The decision hinted that the anti-nepotism statute might not have been meant to apply to the White House or to unpaid positions.

But the ruling also said the first lady had a unique and widely recognized role in helping the president to carry out his duties — she had an office in the White House and a staff — a distinction that would not apply to Mr. Kushner. The Clintons paid a steep political price for insisting that Mrs. Clinton had a right to serve on the task force, ultimately losing both the Senate and the House in 1994 as Republicans assailed what they portrayed as a White House run amok.

“You can try to wiggle your way around the law, but you’ve got to realize the political reality that this is prohibited under the statute,” Mr. Painter said. “It’s a power grab. It’s an overreach.”