Thanks to the OP for posting this great question. The figures are of great help in explaining this interesting aspect of friction related phenomena. In what follows, this answer provides a detailed analysis of the rolling without slipping phenomenon which underlies the physics addressed in the OP.
$$\underline{\textit{Qualitative analysis}}$$
It is easily observed that the contact force referred to as kinetic friction is applied by one surface on another in the direction opposite to that of the relative velocity of the latter surface.
Let us conduct the following static friction related thought experiments. These empirical thought-proofs show that this type of contact force is indeed, applied in the opposite direction of 'impending' relative velocity. Let $f$, $\mu_s$, $W$, $f\leq F$ and $\tau$ denote the relevant component of force of friction, relevant component of static friction coefficient, weight of the object and the externally applied force and torque on the body.
$\textit{Friction block thought experiment:}$ In the figure below, we know that in the static case, $f=F$ and that if $F=f\leq\mu_sW$, then the block has vanishing acceleration. Clearly, the 'impending' relative velocity of the block is in the direction of $F$ towards the right of the figure and the force of static friction is acted by the ground surface on the block surface in the opposite direction of this relative velocity.
$\textit{Rolling without slipping thought experiments:}$ In the case of the circular body rolling without slipping in the figures below, we know that the translational velocity (in the direction of $F$ or towards the right of the figure), $v$, of the center of the circle is given as $v=-\omega R$ due to the assumption of rolling without slipping, where $\omega$ is the non-vanishing $Y$ component of the rotational velocity (with the other components necessarily being vanishing due to the assumption of planar motion) and $R$ is the radius of the circle. Therefore, assuming that the center of the circle is also the center of mass (COM) of the body, we obtain the translational acceleration of the COM as $a = -\alpha R$, where $\alpha$ is the non-vanishing $Z$ component of the rotational acceleration (with the other components necessarily being vanishing due to the assumption of planar motion) of the body. Further, the analysis of the angular momentum implies that $\tau_\text{ext}=I\alpha$ where $\tau_\text{ext}$ is the externally applied torque on the body and $I$ is the moment of inertia about the axis passing through the center of the circle. Further, the rolling without slipping phenomenon implies that the relative velocity of the contact point of the circular body with respect to (w.r.t.) that of the ground surface is vanishing. In both situations depicted in the figure below, this assumption implies that $f=\mu_s W$.
In both thought experiments shown below, the rotational velocity and acceleration of the body are measured positive in the direction of a right hand screw being screwed out of the screen. The coordinate system used is $XYZ$ with the $X$ axis pointing to the right of the screen parallel to the ground surface and the $Z$ axis pointing vertically downwards. In both cases below, the COM of the body will (using our physical intuition in the thought experiment) accelerate towards the right of the page, that is, in the direction $+X$.
- Force driven wheel (figure on the left): The Newton's laws of motion imply that $F-f=\frac{W}{g}a=-\frac{W}{g}\alpha R$ and $-fR=I\alpha$ which implies that $0\leq a$, $\alpha\leq 0$. We observe that if the direction of the static friction force is reversed, we would obtain a contradiction since the rolling without slipping condition would be violated (because the direction of acceleration obtained would be opposite to that required in the known relationship $\vec{a}=-\vec{\alpha}\times R\hat{k}=-\alpha \hat{j} \times R\hat{k}$ to obtain the correct rightward acceleration of the COM). Notice that the direction of the 'impending' relative velocity of the point at the location of surface contact on the body (w.r.t. the ground surface) is in the direction of the applied force $F$ which points in the $+X$ direction, and that the force of friction acts opposite to this direction. Further, as an aside, notice that if the circular body is a uniformly dense cylinder of mass $m:=\frac{W}{g}$, then $I=m\frac{R^2}{2}$, so that the equations of motion yield $F=f$. The static friction condition $f\leq \mu_s W$ therefore implies that $F=3f\leq \mu_s W=3\mu_s mg$, which provides the upper bound on the driving force which allows rolling without slipping. Finally, the derived bound provides insight into the upper bound of acceleration $a=\frac{2f}{m}$ allowable under the rolling without slipping regime. In fact, this is the underlying reason why circular wheels are more efficient than non-circular ones.
- Torque driven wheel (figure on the right): The Newton's laws of motion imply that $-\tau+fR=I\alpha$ and $f=\frac{W}{g}a=-\frac{W}{g}\alpha R$, which implies that $0\leq a$, $\alpha\leq 0$. Clearly, assuming that the direction of the friction of force is opposite to that shown in the figure will lead to a contradiction violating the rolling without slipping condition (because the direction of acceleration obtained would be opposite to that required in the known relationship $\vec{a}=-\vec{\alpha}\times R\hat{k}=-\alpha \hat{j} \times R\hat{k}$ to obtain the correct rightward acceleration of the COM). Notice that the direction of the 'impending' relative velocity of the point at the location of surface contact on the body (w.r.t. the ground surface) is in opposite to the direction of the applied force $F$ in the figure on the left, that is in the direction $-X$, and that the force of friction acts opposite to this direction. Further, as an aside, notice that if the circular body is a uniformly dense cylinder of mass $m:=\frac{W}{g}$, then $I=m\frac{R^2}{2}$, so that the equations of motion yield $\tau=-\frac{3}{2}{f}{R}$. The static friction condition $f\leq \mu_s W$ therefore implies that $\tau\leq \frac{3}{2}\mu_s WR=\frac{3}{2}\mu_s mgR$, which provides the upper bound on the driving torque which allows rolling without slipping. Finally, the derived bound provides insight into the upper bound of acceleration $a=\frac{f}{m}$ allowable under the rolling without slipping regime.
$$\underline{\textit{Conclusions}}$$
- The contact force referred to as kinetic friction is applied by one surface on another in the direction opposite to that of the relative velocity of the latter surface w.r.t. the former surface.
- The contact force referred to as static friction is applied by one surface on another in the direction opposite to that of the 'impending' relative velocity of the latter surface. The direction of the impending velocity, which is a fictitious quantity, is in the direction of the relative acceleration (w.r.t. the surface applying the force) of the point of contact resulting from the dynamics in which the friction force of interest is fictitiously assumed to be vanished w.r.t. the former surface.