WASHINGTON—President Donald Trump signaled he was open to making more deals with Democrats in Congress despite anger from fellow Republicans over a bipartisan agreement that passed the Senate Thursday yoking hurricane aid to an extension of the government’s ability to borrow.

For months, Mr. Trump has publicly mused about negotiating with Democrats, only to stop short. But Wednesday’s agreement on $15.25 billion in relief for Hurricanes Harvey and Irma, combined with a three-month extension of the government’s funding and its borrowing limit, was followed by further outreach to Senate Democratic Leader Chuck Schumer (D., N.Y.) and House Minority Leader Nancy Pelosi (D., Calif.).

As he had Wednesday, on Thursday he singled out “Chuck and Nancy” by name when speaking to reporters, without mentioning their Republican counterparts.

Mr. Trump also announced he was open to eliminating the need for Congress to hold votes on raising the country’s borrowing limit, a policy change supported by Democratic leaders and opposed by many conservatives. Later, after a phone call with Mrs. Pelosi, who had told him that young immigrants were anxious about his decision to scrap in six months an Obama-era program providing a shield from deportation, Mr. Trump tweeted that they had “nothing to worry about.”

Together, the developments suggested a new interest by Mr. Trump in collaborating with Democrats—if necessary against the wishes of his own party’s leadership—on areas including infrastructure, taxes, trade policy and immigration. Such agreements could help enact some of Mr. Trump’s top legislative priorities.

The Harvey package, originally proposed by Democrats and approved on an 80-17 vote, now heads to the House, which is expected to vote on it on Friday. The House approved a smaller hurricane aid bill, without anything else attached, earlier in the week. Many conservatives there are reluctant to vote to increase the debt limit without taking any other steps to curb federal spending. But most, if not all, Democrats are likely to support it, as are many Republicans from Texas, Louisiana and Florida, all states affected by or bracing for the storms.

Asked Thursday if the deal on the debt ceiling signaled more bipartisanship, Mr. Trump said, “I think it does, yes. I think we will have a different relationship than we’ve been watching over the last number of years.” He added: “The people of the United States really want to see a coming together, at least to an extent.”

But deals also carry significant potential risks for all sides, Democrats and Republicans said.

For Mr. Trump, the risk is that he may alienate conservatives and leaders of the GOP who hold a majority in both houses of Congress. Democratic leaders risk alienating their own activist supporters who are wary of any compromise with Mr. Trump. And GOP leaders could face backlash from their own members and constituents who want top Republicans to push a GOP-friendly agenda in Congress and protect the party’s majority.

The most immediate test may come on tax policy, the area that GOP leaders and Mr. Trump have said is their top priority this fall. Some of Mr. Trump’s campaign rhetoric on taxes lined up clearly with Democrats. He talked about reducing tax breaks for high-income households and limiting tax incentives to shift corporate jobs and profits abroad.

House Speaker Paul Ryan said President Trump was aiming for a "bipartisan moment" when he struck a deal with congressional Democrats that combines aid for Hurricane Harvey victims with government funding and a short-term extension of the debt ceiling, overriding Republican concerns. Photo: Jacquelyn Martin/AP

But his other ideas haven’t been consistent with some of these themes. For instance, he wants to repeal the estate tax and also sharply reduce the rates that many wealthy individuals pay for “pass-through” income earned in businesses not subject to the corporate tax, such as law or accounting partnerships.

Both measures benefit the wealthy disproportionately and are likely to be opposed by Democrats. Still, some activist Democrats are already worried that the party might strike a deal.

“I am not confident that the Democratic party will hold and present an effective opposition on taxes as they did on health care,” said Jonathan Tasini, a progressive activist who was a national surrogate for Vermont Sen. Bernie Sanders’ presidential campaign.

And some already are criticizing North Dakota Sen. Heidi Heitkamp, one of Democrats’ most vulnerable senators up for re-election in 2018, who has expressed openness to working on tax-overhaul legislation. She flew with Mr. Trump on Air Force One when he traveled to North Dakota for a Wednesday event to discuss tax policy, where he invited her onto the stage and called her a “good woman.”

“Does she actually feel President Donald Trump coming to Bismarck is a good thing?” said Greg Hodur, former chairman of the North Dakota Democratic Party, in a letter to a local news outlet. “Don’t give him a big hug to welcome him here on our behalf.”

For their part, some Republicans say they wonder whether a president who sided with Democrats in crafting a three-month budget deal can be trusted as a partner on a more significant tax plan.

Trump administration officials huddled with House Speaker Paul Ryan (R., Wis.), Senate Majority Leader Mitch McConnell (R., Ky.) and the chairmen of the tax-writing committees on Thursday, with all sides saying they had made significant progress toward a framework. But outside the Hill, Republican strategists warned GOP lawmakers to be careful.

“He’s not a conservative,” said Michael Steele, the former Republican National Committee chairman, of Mr. Trump. “He’s not coming to the table with a thought-out, established conservative perspective or agenda, so to go into a negotiation thinking that’s how he’s going to present his position is ludicrous.”

Mr. Ryan had a dinner meeting with Mr. Trump on Thursday night to discuss the fall legislative agenda.

Related Video President Trump defied the Republican party this week by striking a deal with Democrats in Congress on raising the debt ceiling, keeping the government running and funding hurricane relief. The WSJ's Gerald F. Seib explains whether this signals Trump will be more independent in the coming weeks. Photo: AP

Trade policy is another area that Trump aides have long seen as ripe for cooperation with Democrats, and they talk often of seeking a “new coalition” built around emphasizing stronger enforcement of trade laws. Mr. Trump’s protectionist pitch during the 2016 campaign was one of his clearest breaks with traditional Republican ideology. Mr. Trump’s choice for U.S. trade representative, Robert Lighthizer, a longtime advocate of tougher trade enforcement policies, won strong Democratic praise and support, especially compared to other Trump cabinet nominees who barely squeaked by.

Clues to the limits of an alliance between Mr. Trump and Democrats may be found in a push to rebuild the U.S. transportation, water and energy infrastructure, which was early on seen as possible common ground between Mr. Trump and Democrats. The two camps remain divided about how such an effort would be structured and funded.

Early on, Mr. Schumer and Senate Democrats attempted a political equivalent of a bear-hug, endorsing Mr. Trump’s goal of $1 trillion in infrastructure spending, but insisting it come from public funds, even if that increased deficits.

That approach is anathema to congressional Republicans, as well as to members of the Trump administration, who say they are trying to devise an infrastructure plan that would shift funding responsibilities to local and state government as much as possible. The White House is encouraging states and cities to raise their own taxes, and to entice private investors to help fund projects by raising user fees and tolls—a strategy that Democrats have harshly criticized as unworkable and unfair to poor residents.

—Louise Radnofsky contributed to this article.

Corrections & Amplifications

The Senate’s bill would keep the government running and its debt limit suspended until Dec. 8. An earlier version of this article incorrectly stated Dec. 15. (Sept. 7, 2017)

Write to Kristina Peterson at kristina.peterson@wsj.com, Siobhan Hughes at siobhan.hughes@wsj.com and Janet Hook at janet.hook@wsj.com