Can you transfer or "return" an undownloaded game on PSN? Accidentally purchased

In general, you should be good with refunding for not-yet-downloaded stuff:

If you started to download or stream the purchased content you are not eligible for a refund unless the content is faulty.

Source, it also advices to contact PlayStation Support to actually get refunds.