By Brian Blackstone and Todd Buell 

FRANKFURT--The European Central Bank warned that the Greek debt crisis could spread to other at-risk eurozone countries if Athens fails to reach a financing deal with its international creditors quickly, underscoring the high stakes involved in the negotiations.

Meanwhile, International Monetary Fund Director Christine Lagarde said in a German newspaper interview that a Greek exit from the euro is a possibility, contradicting comments earlier Thursday by ECB Vice President Vítor Constâncio that effectively ruled out such a scenario.

His comments came amid mixed signals over the status of Greece's debt talks, with Athens striking an optimistic tone that a deal is within reach, while Germany's finance minister said the two sides are still far apart.

A Greek default wouldn't automatically mean that its banks are insolvent, Mr. Constâncio said at a briefing accompanying the release of a report on financial stability in Europe. But the ECB would have to include the implications of such an event in its analysis of the health of the country's financial institutions that rely heavily on ECB loans for funding, he said.

"There is no automatic connection between a default of the Greek government and the solvency of the Greek banks," Mr. Constâncio said, stressing the word "automatic." He noted that the share of Greek government bonds in total bank capital is quite small. Such an occurrence may influence the ECB's impairment analysis of the exposure of Greek banks to the state, he added.

Mr. Constâncio said he was convinced Greece won't exit the euro. "It is difficult to build up a narrative where that extreme case can happen," he said. A country cannot legally be expelled from the currency bloc, he noted, adding that a rising share of Greek citizens have said they want to stay in the euro.

Still, the ECB warned against complacency in its twice-yearly Financial Stability Review, which examines Europe's financial markets and identifies trouble spots.

"Financial-market reactions to the developments in Greece have been muted to date, but in the absence of a quick agreement on structural implementation needs, the risk of an upward adjustment of the risk premia demanded on vulnerable euro-area sovereigns could materialize," the ECB said.

Greece is in protracted negotiations with its eurozone creditors over the future of its bailout deal. On Thursday, the Greek government suggested an agreement was near. "The optimism expressed by the Greek government is based on actual facts," spokesman Gabriel Sakellaridis said. "The conditions are ripe to have a deal."

Other eurozone leaders, such as German Finance Minister Wolfgang Schäuble, have cast doubt on such claims. "We always hear positive news coming out of Greece, which is good. However, we haven't gotten much further in substance in the negotiations between the three institutions and the Greek government," Mr. Schäuble said on German public broadcaster ARD on Wednesday.

Talks between the negotiating teams in Brussels are expected to continue to the end of the week and discussions between eurozone finance-ministry officials are scheduled for Thursday. Significant differences remain on pensions, privatization, labor law and fiscal austerity, eurozone officials say.

Greece is under pressure to agree to economic overhauls with its creditors to unlock new financing. Athens is believed to have enough cash left to repay a loan of EUR300 million ($330 million) to the IMF on June 5, but probably won't have enough to cover three further repayments due mid-June.

"As we stand here right now, we expect the Greek authorities will pay us, " IMF spokesman William Murray told reporters in Washington on Thursday. "Talks are continuing with the Greeks, but work still needs to be done."

Meanwhile, banks in Greece are heavily dependent on ECB loans for funding amid a steady decline in bank deposits there. Mr. Constâncio pegged the total amount of support--through regular ECB loans and emergency liquidity via the Greek central bank--at EUR114 billion.

The ECB also said in its financial stability report that European governments need to redouble their economic reform efforts. While monetary policy "can support the conditions for economic growth," other policies such as structural reforms "are needed to underpin sustainable economic growth in the euro area," it said.

"The financial stability situation in Europe has improved," Mr. Constâncio said. "One can say that our policies are working."

In March, the ECB started a broad-based asset-buying program, known as quantitative easing, where it will buy EUR60 billion a month of mostly government bonds until the end of September 2016 in an effort to prop up inflation.

A report Thursday from the European Commission signaled that so far businesses and consumers in Europe, buoyed by the ECB's stimulus, have shaken off any concerns stemming from Greece.

The Commission's Economic Sentiment Indicator--which aggregates the business and consumer measures--was unchanged at 103.8, its highest level since mid-2011 and well above the average of 100.0 going back to the start of the series in 1990.

Write to Brian Blackstone at brian.blackstone@wsj.com and Todd Buell at todd.buell@wsj.com