Quite frankly, you can head the Activity Monitor to kill the Photos app and then it cannot access your external hard drive anymore.
Just launch Activity Monitor via Spotlight Search > find the running Photos app > double-click the Photos app > click Quit in the new window.
With no accessing from the Photos app, drag the external hard drive icon to Mac Trash and then you can remove it from your MacBook Pro. The files on the drive will not be corrupted if you eject th drive properly.
Take care~