Walmart's brick-and-mortar stores could give it an edge over Amazon at a time when combined online and in-person retail prevails, former Walmart U.S. CEO Bill Simon told CNBC on Thursday.

"The question and the challenge for Walmart is, can they redefine their play into more of an omni-channel play than Amazon? Because that's an advantage for them," Simon said on CNBC's "Closing Bell."

Walmart impressed Wall Street on Thursday with second-quarter earnings and sales that topped analysts' expectations. After a bumpy few years, Walmart's major investments in e-commerce, training and supply-chain management have started to pay off. Walmart beat on earnings, revenue and same-store sales growth, as well as revealing a 40 percent uptick in U.S. online sales.

Walmart gained more than 9 percent after reporting its quarterly results.

"Forty percent e-commerce growth is one of the reasons [Walmart is] struggling a little bit with operating income, because e-commerce is not as profitable as the brick-and-mortar businesses," Simon said.

And it's those brick-and-mortar stores that could give Walmart an edge over its internet rival, he said.

"I am encouraged by the grocery results that Walmart was able to put up this quarter. It's because they've done a lot of hard work in their fresh areas, and fresh is very difficult to compete with online," Simon said. "As Amazon starts to make traction in the grocery piece in the U.S., they are going to have to struggle with that."

Gerald Storch, former CEO of Hudson's Bay and Toys R Us, agreed with Simon that the future is going to be a mixture of e-commerce and brick-and-mortar retail. Thanks to Walmart's investments, it is well-positioned for that.

Walmart knows, "like anyone knows, the future combines the internet with bricks and mortar — so-called all-channel model. They are making that pivot. They've had the wherewithal and the money to do it," Storch said on CNBC's "Power Lunch."

Storch called Walmart's same-store sales growth "really impressive" especially in "an internet age."

"Everyone is not shopping on the internet, and they never will, so they came to Walmart stores in droves," the founder and CEO of Storch Advisors said.

Amazon and Walmart may be each other's biggest competitors, but Storch said they are both "winners" in retail long term, despite the differences in their business models.

"There will be two big winners on the internet: Amazon and Walmart. Everybody else better be playing with one of them if they want to be around 20 years from now," Storch said.