It might not work since they're different platforms with different APIs. The only way an app might work on both platforms is if the app itself chooses to support both APIs.
That said, there's a level of interaction between the two since they both use ActivityPub. I.e. on Mastodon I can search for a particular Lemmy user and see their posts.
Please forgive me for my ignorance on the subject, but is it possible to create a Mastodon account add to a Lemmy app, e.g. Memmy?
Or are Lemmy & Mastdon two very different platforms, Like Facebook & Reddit?
save