If the library is syncing with iCloud, you can still browse your photos using the web interface at http://www.icloud.com, even if your external drive is not connected. But to be able to run the Photos.app and to edit the photos you will need to plug in the drive with the library.
Or enable "Optimize Mac Storage" for the Photos Library in the Photos Preferences > iCloud. your library may be reduced to a size of only 10 percent of the original size. Perhaps this will suffice to keep the library on your system drive.