Sure. You can even put him in a treatment bucket with an air stone or two. This way you can give constant fresh water/salt/meds as needed. I usually add a skim of substrate too and a floating plant to reduce stress. Don't forget to add dechlorinator.
To prevent future outbreaks keep your tank water as clean as possible with water changes. Also clear storage tubs are great as temporary tanks. They will bow with water pressure over 18 gallons but if you double them it isn't a problem. Plus they're cheap and easy to set up: airstone (s), sponge filter, skim of substrate and a hiding spot or two. Floating plants. I always get the tops too and just place them on the lip.