Iirc, you can’t log into Mastadon with a lemmy account, but there should be a way to follow a mastodon account from a lemmy instance. Never tried it, though.
Edit: Apparently, it’s not possible either. Mastodon users can follow lemmy communities, but not the other way around. 😔