If you bought that copy of windows 7 then you can reinstall it to the new system as long as you can find all the drivers 7 will need {some motherbds don't have drivers for 7} otherwise you are correct in thinking that you will need to purchase a new OS since the OEM version of windows 7 that came with their pc's is not legally transferrable to a new system.
There might be a legal way around paying for 10, upgrade the old computer to 10, link it to your MS account that you create and then you can install 10 on the new rig and activate it using your MS account. I haven't tried this but I'm pretty sure it will work.