According to the NEC dishwashers are permitted to be cord and plug connected if such connections are permitted by the manufacturer of the dishwasher. As mentioned this also takes care of the disconnecting means. The requirments are quite restricitve. You cannot just cut off a section of extension cord and connect it to the unit. Is this dishwasher disposal combination connected to the same branch circuit?
Occasionally, the duplex receptacle (has been modified) under the sink is two separate circuits, each being dedicated for separate use like what you are talking about. You have to make an effort to determine if this is the case. One is hardwired for the DW and the other is on a totally separate circuit with the switch for the disposal. Takes a few extra seconds to determine.