You're correct that if the pulley is frictionless the pulley wouldn't rotate. Most likely, the authors of the problem had in mind to say “this is an idealized physics problem” and didn't reason correctly about which parts of the system need this specified, or just wrote the wrong words or incorrectly simplified them during editing.
Here are some possible causes of energy dissipation that could be in the system that they arguably should have specified instead:
- The pivot of the pulley needs to be frictionless.
- A real cord winding around a real pulley will experience some friction as each portion of the cord pushes against the pulley and unwinds again later. This is the same sort of phenomenon as rolling resistance but with different geometry and materials.
- To specify further (if you were trying to, say, create an real-world experiment with negligible error) you would want to specify that the objects are in a vacuum and there is no magnetic field or the materials are not electrically conductive. But it is generally reasonable to not discuss these things since they are "additional" physical phenomena that have not yet been discussed in a typical physics education.
Say you have a weight tied to each side a a rope which is strung over a pulley with friction. Here's a really easy way to see why the tensions on each side of the rope can't be equal.
Imagine a really stiff pulley - in other words, ${\bf F}_\text{friction}$ is high. If that's the case, it'll be possible to balance unequal loads on this pulley system - i.e. a heavy weight on the right side and a lighter weight on th left - without the system moving. If the weights don't move, then we can say that the forces acting on each weight add up to zero:
For the heavy weight, there's the weight downward, ${\bf w}_\text{heavy}$ and there's the tension of the right side of the rope upward, ${\bf T}_\text{right}$. The tension pulls up and the weight down, and the system doesn't move, so
$$ {\bf T}_\text{right} - {\bf w}_\text{heavy} = 0
$$
or
$$ {\bf T}_\text{right} = {\bf w}_\text{heavy}
$$
Similarly for the left (light) side,
$$ {\bf T}_\text{left} - {\bf w}_\text{light} = 0 \quad \Rightarrow \quad{\bf T}_\text{left} = {\bf w}_\text{light}
$$
As you can see, the tension on the right, ${\bf T}_\text{right}$ is equal in magnitude to the heavy weight, while the tension on the left, ${\bf T}_\text{left}$ is equal to that of the lighter weight. The friction is introducing an extra force which changes the tensions on each side.
As far as your question about rope stretching goes, if you anchor a rope on one side and pull, the rope will pull back, creating a tension. This is indeed because of stretching in the rope. This is not really what Newton's 3rd law is referring to. Newton's third law, in this case, tells us that the force that we feel from the rope, tension, is exactly the force the rope feels from us pulling. The two are equal and opposite. You can change the tension by changing the stiffness of the rope, but whatever the tension, Newton's 3rd law will still be true - the rope will feel us pulling it as much as we feel it pulling us.
Best Answer
It is the friction between the pulley and rope due to which the factor $T_1R-T_2R$ appears in the equation. Due to friction,the tensions in the ropes on either ends cannot be same[ The relation is actually $T_1= T_2 e^{\mu \theta }; \mu \rightarrow$ coefficient of friction, $\theta \rightarrow$ angle of wrap of rope around pulley] The friction prevents slipping between rope and pulley and actually causes pulley to turn with the rope. This implies these tensions can't be same. In absence of this friction, the pulley wouldn't rotate. The rope would just slip over the pulley and the tension is same throughout the rope. The friction at the axle, on the other hand, opposes the rotation of pulley - a completely opposite effect as compared to that by the friction between rope and pulley.