Some ideas to consider:
1. Walmart usually has a filter system, so those tanks are actually connected by the water volume, just not by the size.
2. A goldfish WILL outgrow a ten gallon quickly, especially if it's a common 'feeder'. Commons really should go in a pond.
3. If you do get one, you will now be responsible for that fish, and if you falter on taking care of it and massive, massive constant water changes, or investing in a much bigger tank, it will suffer.
3. The minute you buy one, you are putting cash in the companies pocket, and they will replace that goldfish with another one. They will keep doing this as long as people buy them.
If you truly feel like doing something about it, I would recommend writing to walmart, to various animal care organizations and talking to people about proper fish care. This will get far more done than buying a single goldfish.
I've seen lots of people talk about rescuing fish from pet stores, but you are just buying a fish. It may rescue that fish, but there will always be more and more to replace it, as long as people will buy it. Refusing to buy from shabby conditions and letting any store know why you refused to buy will speak volumes.