For smaller fish such as young/small goldfish, I prefer just using a 5-gallon bucket in comparison to setting up an entire tank dedicated to quarantine. If you are someone dealing with lots of new fish regularly, or perhaps you're a breeder/seller then you may want to use a tank as that could be better for your situation. For the average aquarist or those just starting out maybe buying one or two fish at a time then I prefer to just use a 5-gallon bucket, and it's going to be cheaper than getting another tank (plus 5-gallon buckets have many uses in the aquarium hobby). If your entire tank is infected with something, then I would treat the entire tank unless you're dealing with plants and other live creatures that can't handle the medication/s you're going to use in the tank. Also be sure to be mindful of your filter system as certain medications could affect your biological media which in turn can have a negative impact on your aquarium as a whole. Also when medicating it's advised not to use media like carbon as it can remove the benefits of your medication/s. After your treatments have run its course then carbon can help clean up some of that medication, although I prefer doing large water changes over just relying on something like carbon to eliminate everything. I would not add any fabric plants as it can hold bacteria, but you can use plastic plants which are a bit more sanitary and if fish are stressed these may help them feel safer. Also it's more sanitary to not use any substrate, and due to a lack of substrate I would suggest no lighting or very low lighting as the reflective properties from the bottom of the tank could also cause stress.
I notice lots of people like to use either sponge filters or power filters when setting up a quarantine, and that's fine for those long term quarantine setups I mentioned earlier, but I often don't find it necessary for people just quarantining one or two smaller fish. The first reason I don't like to use a filter is because it can take a month to have a filter establish in your setup unless you're adding in good bacteria from another tank. That being said, your other tank if not cared for properly could introduce something bad to a new fish. The other reason I don't see using a filter on a QT tank is because a lot of treatments have you dump out your old QT medicated water after 48 hours, which is then followed up with a re-dose of the treatment. So your medicated QT water isn't really sitting around long enough for it to need to get cycled or to where the water is going to experience a surge of nitrite or even a huge loss in oxygen levels, etc. The other reason I don't recommend using a filter on a short term QT setup is because you can infect your filters media, and then you're just shelling out more money to replace those if you plan to use them in your main tank. The only type of filter I would recommend adding to your setup is an airstone because it's not something that will generally hold bacteria, etc. and with a lot of medications you generally need an airstone added so that the medication doesn't suck away all the oxygen from the water and it helps provide water movement which is often more naturally for most fish, just be sure your water current isn't too strong for your type of fish.
Depending what your fish may be sick with an aquarium heater may be needed, but it may not be necessary. Whether you use a heater or not it's also very handy to have a thermometer to test your water temperatures. When changing or adding new water you want the temperature to match up as closely as possible with the current water temp your inhabitant lives in. If a more than 4-degree F temperature change happens all at once it could in turn shock your fish, thus causing more problems arising, be it something like ich or even death.
Depending on your type of fish the medication/s you use can vary so, be sure you do some research beforehand and follow the medications guidelines on how to use it properly. For goldfish, most people will use Prazi to treat new fish for parasites. Prazi is short for Praziquantel and you can generally find this in powder or liquid form. Another medication is Metro which is short for Metronidazole which is often used in conjunction with Prazi. A fast acting great item to try with both of these two medications in it is API General Cure as it contains both of these ingredients and is used to eliminate a wide variety of parasites like gill and skin flukes, swollen abdomen, wasting disease, ich, and hole-in-the-head (aka Hexamita). As a side note when using a 5-gallon bucket to QT small fish you can get away with using 1 packet of API General Cure over the course of 4 days to have your fish be parasite free on a budget since 1 whole packet treats 10-gallons of water. If your tap water contains chlorine be sure to purchase a big bottle of water conditioner as well because any time you do a water change you will have to use this, otherwise you risk instantly killing your fish. If you aren't sure if your tap water contains chlorine you can either just choose to purchase a bottle of water conditioner (I like Hikari Ultimate for this) or test your tap water, there should be different ways of doing this available at your local pet store. Often if you're on city water you will probably have chlorine, whereas well-water generally may not. One more medication that is often used is Aquarium Salt, be sure it is for aquariums and not table salt, sea salt, Epsom salt, etc. While I don't find Aquarium Salt to be a miracle worker compared to actual medications it can help with gill function and aids in electrolytes, but I'll let you be the judge on how you feel it works for your aquatic friends. Another medication I would also use for quarantining new fish is Tetracycline or Sulfonamide to eliminate Aeromonas which is often a secondary bacterial issue. API Furan-2 is often used for Aeromonas and I find this treatment best for betta fish as they often arrive in tiny cups which create poor living conditions although any fish can have this issue. Aeromonas is something that can be passed on to humans so it's important to wear waterproof gloves when dealing with fish and their habitats. I also like Melafix, if you have fish with minor fin tears this works pretty fast but it can heal fins too fast which may alter the coloring of the damaged fin/s (which I have seen happen with guppies), and I do feel this works better for small fish varieties rather than goldfish. Also if you have some minor tank smells going on this stuff helps a little bit but it's kind of a temporary fix.