No, you aren’t doing anything wrong. Apple doesn’t allow you to paste into certain securedialog boxes. It’s a feature, not a bug. (It makes a brute force hack of the dialog box more difficult.)
You can paste the password into the command line if you mount the secure image usinghdiutil.
Open Terminal and type:
hdiutil attach /path/to/imagefile -stdinpass
When prompted for the password, copy it from a text file or (preferably) a password vault and paste it into terminal.
If the path/to/imagefile is complex, you can type the command, a space, then drag the imagefile icon from the finder into the terminal window to automatically enter thepath/filname.