No -
it lasts centuries is fine. Try Googling it. And if you do a
Google battle for the two phrases you'll find that it comes out as a 20/60 result.
lasts for centuries is therefore more common, but there's no reason why the
for can't be dropped. It's the same rule as above.