Can goldfish have tankmates? Sure, more goldfish.
Goldfish are coldwater fish, and do not do well in the warmer water temepratures that most other aquairum fish live in. For that reason alone golfish should only be tankmates with other goldfish. Even inside the goldfish family, certain goldfish should only be tankmates with similar goldfish. Keeping a vision impaired goldfish with an energetic goldfish tankmate is just asking for disaster. The goldifsh with good vision will find the food faster than its vision imparied goldfish tankmate, causing the tankmate to not receive proper nutrition. To be safe some people will only have the same species of goldfish as tankmates.
Why do you want Goldfish Tankmates anyway?
The typical answer is for algea control, so you would think that some kind of algea eater would be good. Algea eaters can be a dangerous Goldfish Tankmate. Besides sucking on the side of the tank, the algea eaters will also suck on the goldfish, sucking away their slime coat. Without a slime coat the goldfish will be more open to goldfish diseases. Besides sucking away the goldfish slimecoat an algea eater tankmate can also suck at the eyeball out of some telescope, or celestial goldfish.
So, algea eaters are out, but we still have that Algea problem.
Snails are probably the next thought, and while there is a single type of snail that is recommended as a goldfish tankmate, most snails won't work in as goldfish tankmates. However, apple snails have been shown to be good goldfish tankmates, when kept as a single snail.