A 91-year-old retired surgeon has been charged with importing cocaine hidden in soap into Australia, prompting police to warn travellers to beware they are not tricked into becoming drug mules.

Victor Twartz, of Sydney, was released on bail when he appeared in Sydney's Downing Centre Local Court charged with importing a commercial quantity of cocaine on July 8. He will return to court on October 6.

The former oral surgeon faces a potential life sentence if he is convicted of importing 4.5kg (10lbs) of the drug into Sydney Airport on a flight from New Delhi.

A search of Twartz's luggage found 27 packages of soap which tested positive for cocaine.

Twartz told Australian Broadcasting Corporation he had met people in New Delhi whom he had befriended online. As he was about to board his plane to return to Sydney, he said he was handed a bag that he was told contained gifts for someone in Australia.

As Twartz left court, a reporter asked if he had been taken advantage of. Twartz replied: "Always, always."

Police have not said whether Twartz was an unwitting drug courier but Australian Federal Police manager Wayne Buchhorn warned that unwittingly bringing drugs into Australia could result in charges.

"People can expect they will be charged if they knowingly bring drugs into Australia, or are reckless or wilfully blind to the fact that there could be narcotics concealed inside their luggage or items they are carrying," he said.