In a 1 dimensional setting at any given non-zero speed, there are precisely two velocities which have that speed, one pointing in one direction and one pointing in another. If one does not change from one of these velocities to the other, then this is obviously a zero acceleration situation. If one does change from one of these to the other, it must be instantaneous, as there are no intermediate velocities which have the same speed. Any non-instantaneous change must be changing speed during that transition period, which is in violation of the "constant speed" assumption.
What this means is that, in these situations where the velocity changes direction (such as rebounding off a wall), this model is insufficient to describe precisely what happens at the transition. In classical mechanics, velocities are changed continuously, and the associated acceleration is proportional to the force applied to the object. An infinite acceleration obliges an infinite force (note: Newton's laws only apply to objects which have a non-zero mass).
In practice, we can work around this limitation with some logic. Choosing $t=0$ to be the time at which the object rebounds (just for ease of notation), we can say that the object has a constant speed before impact, and a constant speed in the opposite direction after impact. The traditional approach to this is to define some very short duration $\epsilon$ and say that the speed is constant for $t<-\epsilon$ and constant in the opposite direction for $t>\epsilon$ and that "something happens" during $-\epsilon \le t \le \epsilon$. We then reason about what happens using other approaches. For instance, we know that momentum is conserved in all Newtonian systems, and energy is conserved in elastic collisions. Between these we can constrain what can possibly happen during that "something happens" window and reason that the velocity changed direction somehow.
"All models are wrong; some are useful." By considering smaller and smaller $\epsilon$ values, where the window of "something happens" gets shorter and shorter, we start to see a convergence in what can possibly happen, so long as the conservation of momentum and energy apply. And we can take this to an extreme and say "well, what if $\epsilon=0$?" It's not "correct" in the sense that it implies infinite accelerations and infinite forces, but for purposes of calculating what happens at all times other than $t=0$, it is effective.
Thus we can model the system as a particle moving at a constant speed in one direction for $t<0$ and moving at a constant speed in the other direction for $t>0$. We just can't say very much about what happens at $t=0$. The model is not very useful for answering questions like this. We typically have to move to a more complicated model, such as one with 2 dimensions or one with deformation. But we'll find that in a lot of practical situations, this is actually good enough to do the predictions we need.