Yes, but keep in mind hashtags look awful on Lemmy and the first line of text of your toot becomes the post title. A lot of mastodon posts onto Lemmy are really ugly and borderline incomprehensible. So be careful.
It doesn't really work the other direction. Mastodon users can post and comment on Lemmy communities by @ ing the community. There isn't a way for Lemmy users to browse hashtags or users from Mastodon. Even if you click on the user profile for a mastodon user from Lemmy, it'll only show you the stuff they've posted and commented on Lemmy instances, not the full activity of the account.