the second. I want to protect some image files by a password so that only I can access them.
Aperture does not have the option to hide single images. You could create a second library and store this in folder that only you can access.
If it only are a few files I'd store them on a writable, password protected Disk Image (sparse bundle). You create it easily with Disk Utility. It will be like a vault protecting your secret files.
To view and manage the image files, double click the disk image to mount it as disk. Enter your password. Drag your images to it. Browse your images, then eject the disk image again.
Launch Disk Utility and press "New Image +". Set the parameters like this:
Pick a suitable size to store all images, set an encryption, and select an read/write image format.
You cannot password-protect individual Images.
You could just put them in their own Library.
And keep that Library on an external drive.
And use a drive that features a passcode lock.
Or encrypt the whole drive.
Encryption will lower performance.