For me the second case was more intuitive. The friction and gravity both induce torques of the same sign on the body.
Gravity acts through the center of mass, which in this case aligns with the center of rotation. So gravity is not inducing any torque. All the torque is coming from friction. If you imagine the same scenario where the ramp is frictionless, the ball will slide down instead of rolling. No friction, no torque, no angular acceleration.
Friction is in the direction opposite the acceleration. It is reducing the speed that the object would have.
But I'm lost on the first case.
For me the first case is ambiguous, because it says it is accelerating, but not how. I think the obvious way to do it is by a force on the body (gravity, wind, string), which makes it just like the second case. The object is forced in one direction, friction acts in the other direction (opposite the direction of the acceleration) and produces a torque. Again, on a frictionless surface, the object would accelerate, but without friction giving a torque, it would not spin.
However, in the case of an automobile's drive wheel, the acceleration is due to a direct torque placed on the wheel by the engine. There the friction opposes the wheel's angular acceleration and gives a force that points forward (toward the direction of the auto's acceleration). Perhaps this is the case that they are considering.
In these cases it always helps to draw a diagram:
![enter image description here](https://i.stack.imgur.com/SDDAR.png)
The green vectors represent the force of gravity $w=mg$ (dashed) and its components along the inclined plane and perpendicular to it. The red forces are the normal force of the plane on the ball $n$, the force of friction $F$, and their vector sum (dashed).
Now the sphere rotates about the contact point - that is the point that doesn't move. In that frame of reference, noting that the red vectors all pass through the center of rotation we compute the torque as the force of gravity $w$ times the perpendicular distance to the pivot point $d= r\sin\theta$, i.e. $$\Gamma = w\cdot r \sin\theta$$ and we consider the moment of inertia of the ball about this pivot to be $$I = \frac25 mr^2 + mr^2=\frac75 mr^2$$
(by the parallel axes theorem).
As you pointed out, by considering the motion about the contact point, the value of $F$ doesn't seem to come into play. But remember that the center of mass of the sphere must accelerate as though all forces are acting on it; after canceling out the normal forces, that leaves us with $mg\sin\theta$ down the slope, and $F$ going the other way. The difference between these two forces gives rise to the acceleration of the sphere's c.o.m. so we can compute $F$ from
$$mg \sin\theta - F = m a$$
To compute $a$, we first need the angular acceleration $\dot\omega$which is found from
$$\dot \omega = \frac{\Gamma}{I} = \frac{mgr\sin\theta}{\frac75 m r^2} = \frac{5g\sin\theta}{7r}$$
The linear acceleration $a$ is of course the angular acceleration multiplied by the radius of the sphere, so
$$a = \frac57 g\sin\theta$$
From which it follows that
$$F = \frac{2}{7} m g \sin \theta$$
And if we know that, we can now compute the angular acceleration of the sphere about its center. The torque seen in the frame of reference of the sphere is
$$\Gamma' = Fr = \frac{2}{7} m g r \sin\theta$$
Now we use the moment of inertia of the sphere about its center in order to compute the angular acceleration, and find
$$\dot \omega = \frac{\Gamma'}{\frac25 mr^2} \\
= \frac{\frac{2}{7} m g r \sin\theta}{\frac{2}{5} m r^2}\\
=\frac{5 g \sin\theta}{7 r}$$
which is the same result as before.
So there is no contradiction. The forces of friction and gravity work together to cause the rotation - the difference in apparent torque comes about from the fact that you are working in different (and non-inertial) frames of reference, but if you do the calculation carefully you get the same answer.
Best Answer
You have not considered the direction of torque in you equation. Since the Torque is caused by Frictional Force $F_r$ which is in the direction $-i$. the torque is $\vec{\tau}= \vec{r}\times\vec{F_r}$ and $\vec{r} $ is in $j$ direction So the cross product yields
$\vec{\tau}= -|r||F_r|\hat{k}$
which ofcourse is in the negative direction of positive z-axis