Goldfish are immpossible to sex. The pet store can not tell you if your goldfish is a male or female, nor can they tell if one that you purchased is male or female. When they are much older, 1-2 years and larger- 3-6 inches, you may be able to start to guess.
Your carnival prize fish is likely a common feeder gold fish that can grow an inch every month or 2, until it is 10-12 inches long. And yes they are social and do belong in groups or at least pairs.
They are some of the largest and dirtiest fish available to hobbiests, and they need the largest tanks and filters, or they need to be in a pond.
Get the biggest tank you can . it/they will outgrow any tank pretty much, but a 44 gallon breeder, or a 55 gallon 60-75 or 90 gallon tank that is 48 inches long will be good for a couple years most likly. I you get a marine land filter that is rated for a tank twice the size of the one you get. You will also need a bottle of water conditioner. I recomend prime, it will keep the fish healthy until the tank cycle is complete. I would use prime whith all new water, with all water changes, and i recomend that you add enough prime to dose the entire tank in between weekly water changes, once a week for the next 8 weeks, them go back to just adding it to new water.
A kiddy pool or large bin with filter can work if you can not get an aquarium that is 48 inches long , or longer.