If you only have acces to the file/folder via a shared link, then you are correct, it is not possible to use the get_thumbnail endpoint with a shared link URL to generate a thumbnail. Nor is there an alternative way to generate a thumbnail.
A feature request already exists to include a preview/thumbnail URL for a shared_link, I have added your additional vote for this feature to that request.