If I understand what your asking, the answer is yes, you can connect the Win 7 hard drive to the Win 8 computer and format it. However, I don't think that's what you really want to do. You wish to re-install Win 7 on that hard drive and you can't do that while it's attached to the Win 8 computer.
You need to figure out why you can't boot from the Win 7 install dvd. How old is the Win 7 computer? If it's new enough, you may need to go into the BIOS settings to disable Secure Boot. You also need to change the boot order in the BIOS so that it first tries to boot from the dvd drive. Where did you get the Win 7 install dvd, is it something you downloaded off some obscure website or is it a genuine dvd that you are confident is good? Can you boot that dvd on another machine?