A router wont prevent a virus from spreading inside a network, they are basically the crossroad of your network that can send data where it needs to go. It doesn't distinguish between malicious and harmless data.
Assuming you have an internet connection at all you would already have a router, possibly combined into your modem. If it has more than 1 Ethernet port, you should be able to get multiple machines access to the Internet.