Can a Bitcoin node send messages to a program on the same machine?
Yes and no.  Don't use 8332 for your custom client's communication port, that is the default rpcport.

You can run an arbitrary number of bitcoind instances on your machine, as long as they are given different -port= and -rpcport= arguments, and they can all communicate with each other (using -addnode=127.0.0.1:...port... or -connect=127.0.0.1:...port... ).