It's really not worth the upgrade - you'd be better off replacing the system with something newer.
You will not be happy with the performance of Windows 8 or 10 on that hardware.
At any rate, the only version of Windows you can use is 10 at this point - 8 is no longer available.
You should be able to clean install Windows 10 64 Bit on that model however you will need to purchase a new license from Microsoft in order to activate:
You can pretty much get a second hand business laptop such as the Latitude E series with a Windows 7 Pro OEM license (works with Windows 10 Pro installation media) for that price which would give you a better machine to run Windows 10 with.