Yes. You can run them both on the same machine and it would probably be cheaper that way.
To minimize costs, besides looking at the cost of hardware, you’ll also want to consider the amount of electricity that the server uses with the memory and hard drives you have installed.
The Monero docs say it uses 100 GB or more bandwidth a month. You may want to look at the quality of service settings on your router to make sure that it’s not interfering with other uses of your network.