You can, but you need to follow two specific rules. First, the electrical rating of the extension cord must be at least as great as the appliance's rating.
Second, arrange the longer cord so it doesn't drape over the counter where it could be pulled by kids or tripped over. Do not let any cord hang over the edge of a table or counter.