"If you don't behave yourself,you may get invaded,"he added.
Australia has said the treaty contained a statement of non-interference in internal affairs of another country that could make it impossible for it to criticise such things as human rights issues,besides other concerns.
Dr Mahathir - long an opponent of Australian attempts to grow closer to the region - is now retired. While he is no longer part of the formal decision-making process,his party remains in power and his opinions carry considerable weight in Malaysia.
"I don't know whether Australia is Asia,but it may change the geography. Actually they are Europeans,they cannot be Asians,"he told reporters.
His successor,Abdullah Ahmad Badawi,appeared to have adopted a softer stance,saying last week that Australia would be invited to attend the summit next year.
An East Asian Community would be the realisation of a 1990 proposal by Dr Mahathir. It has failed to take off due to opposition from the United States,which feared it would undermine the 21-member Asia-Pacific Economic Co-operation forum.
On Monday,Dr Mahathir appeared to relish the freedom from diplomatic restraints which he won with his retirement last year.
In a speech to the conference,he lampooned US President George Bush's understanding of Islam and economics.
While he never pulled his punches during his 22 years in power,this time he broke with convention to attack Mr Bush personally by name.
"When the planes crashed into the World Trade Centre on September 11,2001,Bush immediately identified what he thought was the true cause,"he said.
"It was because the Muslims were jealous of the freedom of the American people. It was because the Muslims were poor. This exposes a lack of understanding of things on his part,"Dr Mahathir said.
"Likewise Bush is not likely to know the true causes of the US dollar depreciation and the apparent rise in the price of oil.
"Bush is not likely to link it with the huge deficits of the US or the spendthrift ways of his government. We cannot expect Bush to do anything to restore the correct value of the US dollar. Nor would he be able to correct oil prices."