Run “get_the_post_thumbnail” with a different table prefix?

Why didn’t you use a Network/Multisite install? Problem mainly is that all the queries normally have the current install prefix in use. Without having real access (via $wpdb) to the prefix, this will get pretty messy. Actually your problem is a X-Y Problem.

It would be less work to export everything from one of the sites, quickly convert the other site to multisite and then import the data again.