"They need a brick-and-mortar component perhaps to compete with Wal-Mart on food," Cramer said on "Squawk on the Street." "Wal-Mart has such good leverage."
Cramer's comment came as Wal-Mart has picked up some customers from mainstream grocers and said its grocery business in the U.S. continued to improve last quarter. Its food categories delivered the strongest quarterly comparable sales performance in more than three years.
Shares of Wal-Mart were higher in early trade on Thursday after it reported better-than-expected quarterly sales, as its competitive pricing brought more shoppers into its stores and its effort to expand its online presence paid off.
Amazon, which has dominated the online retail space, has grown a presence in the grocery space with different approaches, such as the AmazonFresh service.
The e-commerce giant has also been experimenting with a super-convenient, line-free grocery store called Amazon Go, which features ready-to-eat meals and snacks. The rollout of the physical stores reportedly has beenhit with delays, however.
Late last month, there were reports that Amazon considered a takeover of grocery company Whole Foods. But Cramer said this is unlikely to happen.
—CNBC's Lauren Thomas contributed to this report.