It depends on the store. Walmart will accept items from another
store as long as they carry the item whether it be from the store
itself or the website. You'll be given store credit only in the
form of a gift card.
Note: Marketplace purchases from Walmart.com must be returned through that vendor. The vendors are listed on Walmart's website under the return policy section.