While this won't work for an external HDD, you can absolutely do this with the regular Xbox 360, as long as your friend has their console hooked up to LIVE. Signing your profile in will transfer the game licence to that console, allowing you to play it there instead. When you reattach it to your own Xbox, it transfers the licence back.
And before you ask, no - copying the game file to your friend's MU won't let them get the game for free. They'll only be able to play while your profile is present on the system. As soon as it's gone, the file will change to a trial version. :)

