That is not a good idea
I would definitely NOT put drain cleaner (any type, but especially caustic drain cleaner such as sodium hydroxide) inside any equipment - e.g., dishwasher, washing machine (laundry), disposal. Drain cleaner should only go directly into drain pipes. Drain cleaning chemicals are designed to interact with and dissolve accumulated hair, grease and dirt in some manner (the exact method depends on whether it is a caustic cleaner or enzyme based or something else). Drain cleaning chemicals are NOT designed to clear out "foreign objects" (classic example is a toy down the toilet, but this can also include other things such as small pieces of plastic or metal that ended up in the dishwasher drain)
The general process is to figure out if the problem is in equipment or in the pipes. Disconnect the equipment from the drain pipes. In the case of a dishwasher that is normally by detaching a flexible hose from the dishwasher. If you think there is a clog in the pipes, ideally disconnect any flexible and/or easily removable parts (in the case of a dishwasher, disconnect the hose from the sink/disposal end and do any serious drain cleaning (snake, drain cleaning chemicals, etc.) starting at the sink trap (preferably AFTER the sink trap if it can be removed easily) and definitely after the disposal.
Assuming that the pipes are clear (either clogged and now clear, or tested by running large volumes of water from the sink and determining that there is no problem), then the problem is in the equipment. That can be a problem with a pump, with drain line configuration (dishwasher requiring high hose loop or air gap but instead having a straight hose) or something broken/blocked inside the equipment. If there is something broken inside the equipment then drain cleaner would only make it harder to fix. If there is something blocked inside the equipment then it is unlikely (though not impossible) that it is something that drain cleaning chemicals can fix. More likely it will be plastic or metal which may be affected somewhat by drain cleaner - but the dishwasher parts themselves (pumps, fittings, etc.) can ALSO be affected, negatively, by drain cleaner. Drain cleaning chemicals have the big advantage of working, to paraphrase Einstein, as "spooky action at a distance", but that is not an advantage for a dishwasher which is totally accessible.
Bottom line: Don't pour anything down a dishwasher not recommended by the manufacturer. Unlikely to fix anything and likely to break something else.