How to enable the windows/linux-like "click to open/reduce windows" on the dock
Sounds like you just need to check "Minimize windows into application icon" in System Preferences → Dock. 

The application will then get minimized into its own Dock icon and clicking it will restore it, exactly as you suggest (although the restore behaviour should also happen even if the icon is minimized into the right hand side of the Dock).