Welcome to our forums.

As long as the old iPhoto library is stored on that drive as a separate file and not part of a Time Machine backup, you should be able to transfer it to the 2017 MacBook...