Hello and welcome to Apple Support Communities, wake3!
I understand you've found malware on your Mac and would like to remove it, but you've been unable to due to being told you don't have permission to access the file. I'd be happy to provide information to help you out.
Even though this article indicates it's to block pop-ups, follow the same steps: How to block pop-ups in Safari
If you see pop-ups on your Mac that just won’t go away, you might have inadvertently downloaded and installed adware (advertising-supported software) or other unwanted software. Certain third-party download sites might include programs that you don’t want with the software that you install.
If you think that you might have malware or adware on your Mac, update to the latest version of macOS. If your Mac is already running the latest version, restart it. macOS includes a built-in tool that removes known malware when you restart your Mac.
Check your Applications folder to see if you have any apps that you didn’t expect and uninstall them. If you continue to see advertising or other unwanted programs on your Mac, contact Apple.
I hope this helps.
Thank you for using Apple Support Communities.
Have a great rest of your week.