My Mac died.
When I connect my external hard drive to my laptop I can't access my iPhoto – it says iPhoto won't open because it's a machine backup.
It's true that with a normally running operating system on a Mac, an iPhoto library can be stored on an external drive.
Normal running of iPhoto will involve file system writes to the iPhoto library and elsewhere.
When Time Machine backs up to an HFS Plus file system, most of the files that are associated with its backups database are saved in a way that prevents further edition; that prevents deletion – prevention until it becomes necessary for a point in time in the backup to be thinned.
Because edition and writes are prevented, iPhoto will be unable to launch and work with any iPhoto library that's within a backup database …
Essentially, as soon as possible, you should restore your iPhoto library – and whatever else you will need:
The destination drive can be internal or external.
Side note: do not aim to restore from the backup drive to a different area of the same drive; you would continue to have a single point of failure, which is horribly risky.
Consider replacing that failed internal drive. Then use Time Machine to restore data to the replacement drive.
(What model is the failed Mac, how much memory does it have, and so on? Edit your question to include relevant details – thanks.)
Take the good internal drive. Consider arranging for it to be placed in an enclosure that will be suitable for use with your good Mac laptop. So you'll have an additional external drive for use with whatever computer you want.
(What model is that good Mac laptop, how much memory does it have, and so on?)
It's likely that a suitable external drive enclosure will be more economical than a drive.
Initial cost should be not the only factor in your decision … adding background information (specifications etc.) to your question should help people to make recommendations in answers.
And if you do not connect your external hard drive to your laptop, then you can access iPhoto? This is how I interpret your question...
iPhoto remembers the last selected iPhoto library - may be this is the problem?
The solution might be: hold down the option key (ALT) and launch iPhoto: iPhoto will show you a dialog with different options: either you can use the last selected library or you change the current library.
If this does not help, then it might help to improve your question. :-)