Conventional AC and dehumidifiers remove water from air by cooling both until the cooled water drops out of solution. This is supposedly using chemical means to remove hot water from the air so that you don't have to cool it.
Energy is being put into the system but it is less than the AC unit cooling humid air on its own so is a net gain relatively speaking.
Why would it be a problem to do just the middle one instead of all three?
I recommend you look up how heat-pumps work: https://www.nrcan.gc.ca/energy-efficiency/energy-star-canada...