In short... the answer is Yes.
The longer answer is quite a bit more complex. A router is a computer. The operating system and hardware are specifically designed for the task, but essentially they are the same. As far as setting up your own computer as a router, 99.9% of this question depends on what operating system you are running. Also, the kind of router also makes a difference. Windows has a built-in feature called
Internet Connection Shairing which sets up a very simple NAT'ing router, whereas Linux operating systems uses a combination of
iptables with the
masquerade module and kernel-mode routing. Apple computers are very similar to Linux in the way you configure them, but I'm sure they have a simple GUI for configuring such. If you want a non-NAT'ing router, Linux can do this quite simply, but Windows has no way of doing this (without 3rd party tools) until you get to their Server platforms.
As far as a client/server application goes, there is really no need to implement a
router from what I can gather by your question. Can you give some details about the scenario?