Block opening of DMG files by non-admin user
Here is a solution that may work for you.

Paste this following AppleScript code into a new ScriptEditor.app document then save it as a .scpt file "AutoEjectFolderAction.scpt" to your /Users/your user name/Library/Workflows/Applications/Folder Actions/ ...folder

on adding folder items to theFolder after receiving theNewItems
    -- Add Names of Any USB, Flash Drive, or Disk Image to allow to be mounted
    set allowedDisks to {"Time Machine Backups", "Parallels Desktop 13.2.0 (43213)"} -- examples to be allowed
    tell application "Finder"
        set ejectableDisks to disks whose ejectable is true and local volume is true and name is not in allowedDisks
        eject ejectableDisks
    end tell
end adding folder items to


That new .scpt file will now be used as a folder action that we will attach to the folder... /Volumes









Now every time A new disk image gets mounted, it will trigger the folder action which will run the script that will automatically eject it.