Webpush or UnifiedPush would be the answers, but neither is currently supported by Lemmy.
Edit: but please don't abuse Lemmy's DMs as a sort of instant messenger. It's not meant for that and also insecure. It's meant to be asyncroneous like email at most and you don't need push notifications for that.