Soaring debt levels in China were a serious concern as the fallout of any crisis would hit everyone else, said a former International Monetary Fund (IMF) economist on Thursday.

"If there's a country in the world which is really going to affect everyone else and which is vulnerable, it's got to be China today," Kenneth Rogoff, economics professor at Harvard University, told CNBC's "Squawk Box" on Thursday.

"The whole region's dependent on China... so I certaintly think you could see (the export of) a recession out of China," added Rogoff, who was chief economist and research director at the International Monetary Fund from 2001 to 2003.

His comments came as the world second-largest economy grapples with growing pains, while trying to rein in high debt levels.

"They are trying to keep up their growth, (but) there are lot of factors that would constrain it, particularly as they move from being export-led to domestic-driven," he added.

Just as shifting gears to a consumption-led economy has been tough for everyone else, it would also be difficult for China, Rogoff said. China has fueled its explosive growth via a massive credit buildup.

"China has a lot of capacity to absorb its credit problems, because in some sense, the private sector has a government shell over it, but it depends on rapid credit growth to grow," he said. "When they slow down credit, growth slows down. So you don't necessarily have to have cascading defaults to have a pretty sharp drop in growth," he said.

Concerns over China's economy have grown as policy makers' stimulus efforts have also spurred a leverage buildup.

In late May, Moody's Investors Service expressed concern that China's effort to support economic growth would spur higher debt levels, and the ratings service downgraded the mainland's sovereign credit rating to A1 from Aa3, changing its outlook to stable from negative.

In a recent note, Nomura estimated that China's outstanding non-financial sector debt hit 191.3 trillion yuan ($27.96 trillion), or 251 percent of gross domestic product (GDP) in the first quarter, up from 158.3 trillion yuan, or 231 percent of GDP, at the end of 2015.

Moody's estimated that the government budget deficit in 2016 was "moderate" at around 3 percent of gross domestic product (GDP). But it expected the government's debt burden would rise toward 40 percent of GDP by 2018 and 45 percent by the end of the decade.

Official data put total government debt at the end of 2016 was 37 percent of GDP, the Institute of International Finance said in a May note.