Carl Icahn said on Thursday that it is time for investors to tread carefully after the run-up in U.S. stock markets.