It will depend a little on the manufacturer but essentially yes but only if you use the installation media provided by the manufacturer. If it was 8 you cannot leapfrog straight to 8.1
There may be changes required in order to install Windows 8 but you would have to confirm this with the OEM, I am thinking primarily of enabling Secure boot in the BIOS.
Windows 7 will know nothing about the embedded key, it only requires the SLIC entry in the BIOS table for its anti-piracy function. Conversely Windows 8 will ignore the SLIC and check for the Key. Therefore the two systems can co-exist on the same computer.
Make sure you have created the Windows 7 recovery media, there should be a utility installed on the computer to do so. What operating system would be installed if you activated the HDD based recovery will also depend on the age of the system.