This is an air gap fitting for your dishwasher drain. You still need it. Its job is to ensure that waste water in your drain cannot backup into your dishwasher. Since the dishwasher isn't really water tight above a certain level, this eliminates the risk of raw sewage from ending up on your floor via the dishwasher. The air gap needs to be above the flood level of the sink and should be pointed into the sink in case the air gap clogs when the dishwasher is draining.
For your soap dispenser, you'll either need to move the air gap to another side of the sink or move the soap dispenser, but you can not get rid of the air gap or try to hide it under the sink.