Can I connect external hardrive with time machine to someone else's mac to access one file
Yes, this is possible. A Time Machine Backup is readable by any other Mac as long as the Time Machine Backup is not encrytped. Even then you can unlock it with your password.

Also see this answer.