If an aircraft is close to (or in) a stall, deflecting an aileron downwards will increase the angle of attack. The increased angle of attack can be enough to stall one wing and cause it to drop.
For example, if an aircraft has the right wing dropping in a stall and the pilot rotates the control column left in an attempt to prevent the wing drop, they will only make the situation worse. The aileron on the right (dropping) wing will deflect downwards, increasing the angle of attack and worsening the stall. The pilot would expect the aircraft to roll left and return to wings level but in fact the right wing will drop further!
For these reasons, ailerons must never be used to level the wings in the event of a wing drop close to a stall.
Instead, the pilot should use rudder in the event of a wing drop to prevent any further yaw and use the elevator to reduce the angle of attack. Once the wings are unstalled (angle of attack reduced), ailerons can be safely used to return to wings level.