When the direction of a movement changes, is the object at rest at some time?

After the invention of modern calculus and notions like continuity and differentiability, the answer is quite trivial in Newton's formulation of mechanics assuming the body is moving along a line. The second derivative of the position should be always defined as it equals the total force acting on the body. Therefore the first derivative must be continuous. This derivative is the velocity. You are assuming that it changes its sign passing from time $t$ to time $t'$. A continuous function defined on an interval which changes its sign at the endpoints of the interval must vanish somewhere in the interval. That is an elementary result of Calculus. In summary, the body must be at rest at some time, if accepting the modern version of Newton's formulation of classical mechanics.

The objection that if the body stops at a certain instant, then the direction of the motion immediately after that instant cannot be decided is untenable. The direction is actually decided by the acceleration, that is by the total force acting on the body at the said instant.

I assume you are talking about an object that reverses direction through a collision. Take the case of a ball bouncing off the ground. As it hits the ground, the ball deforms and the ground compresses a tiny amount. The resistance of the ball to deformation and the resistance of the ground to compression decelerate the ball to the point at which its centre of mass is stationary, and thereafter accelerate the ball upwards.

The 'dilemma' is the mistaken result of assuming that no force acts on the object at the point at which its motion is stopped.

To explain this, I shall use the same example of a ball bouncing on the ground. In a perfectly ideal world, the ball will never be at rest throughout the bounce. There will be a time $t$ when the ball is going downwards. At time $t+dt$, the ball will be going upwards. This assumes that the coefficient of elasticity of the ball is exactly $1$ and the ball and ground are extremely rigid.

However this cannot happen in real life as there is no body is perfectly elastic. Also, the above case would also imply that the force applied by the ground on the ball would be ${\infty}$.

Practically speaking, the ball hits the ground and gets deformed. The velocity slowly decreases to $0$ as the kinetic energy gets used up in changing the shape. The ball will be at rest at a particular moment before bouncing up again.