The conference focused on defending democratic and free-market principles at a time when they appear under siege both in the United States and abroad. It brought together Republicans and Democrats in what seemed almost like a meeting of the exiled bipartisan order, sharing their anxiety about Mr. Trump’s leadership in the world.

Ms. Haley, a former governor of South Carolina with no significant foreign policy experience before being sent to the United Nations, has become one of the highest profile members of Mr. Trump’s team and a possible successor to Secretary of State Rex W. Tillerson, whose strained relationship with the president has made him something of a dead man walking.

At times during her tenure, Ms. Haley has spoken off the official administration script, expressing sentiments more in keeping with her predecessors from both parties. But at other times, she has been Mr. Trump’s explainer and defender to the world even as he pulls out of international agreements and seeks to slash the American diplomatic corps.

At this week’s conference, Ms. Haley, 45, sat between Ms. Rice, 62, and Ms. Albright, 80, and gave the impression of welcoming advice from mentors. She smiled and nodded at some points when one secretary or the other urged her to take a course different than the one favored by the administration.

Ms. Rice expressed confidence afterward that the encounter had been useful. “I thought it was a very good exchange,” she said in an email, “and it did show bipartisan support for the importance of American diplomacy and for proper resourcing of the tools to carry it out.”

Ms. Rice and Ms. Albright were particularly eager to press Ms. Haley to resist Mr. Trump’s proposals to slash the State Department budget by nearly 30 percent, eviscerating the diplomatic corps. Ms. Rice noted that fighting AIDS, supporting women’s groups and financing election monitoring go a long way toward advancing American interests.

“The difference between the budget for the Pentagon, over $600 billion, and for the State Department, under $50 billion at the moment, is crazy,” Ms. Albright said. “We do not have a lot of tools. It is necessary to have a functioning diplomatic service.”