Is there a way to set up an ssh tunnel, then connect an arbitrary program (say, an IRC client) to the port on localhost and get an effectively secure connection to a server? How would I go about doing this?
Yes. Anything tunneled via SSH will be encrypted. Note however that the protection is of course just only between the two points you build up your tunnel up. So to have a completely secure IRC connection with a SSH Tunnel you would have to build a tunnel to the IRC Server itself.