That's not true. It's certainly legal to own lab equipment, but when you start combining equipment with the intent to make cocaine, you're committing a crime long before any drug is produced.
Any country who's a party to the 1988 UN Convention Against Illicit Traffic in Narcotic Drugs has such laws, including the US, UK, and most of Europe.