I'd like that the yellow button at the top left corner of a window will hide it - without keeping an extra window icon at the dock.
Firstly, just a heads-up, ⌘H will hide the active application.
Since you mentioned that you'd like to keep the application from adding an extra icon to the dock when you minimize, this is a solution.
System Preferences -> Dock and check the box labeled "Minimize windows into application icon". Checking this option produces the obvious result leaving you with less dock icons when applications are minimized.