Confusion about tensions and friction in pulley problem 
The pulley is not massless, and has moment of inertia about the hinge point $I$. We assume there is no slipping of the rope. My teacher said that the first equation we make will be $T_1 = f + T_2$ or $f = T_1 - T_2$ ($f$ is the friction). Unfortunately this is already where I'm confused. I understand that in the simplified version of this problem (no friction, so no rotation, massless rope) the tension throughout the rope would be the same. Here the only additional force that has been added to the rope is the friction, so a part of me is telling me that that is what's causing the differences in tension on either side, but that doesn't make much sense to me. Is the reason for this perhaps that the rope is inextensible, so the forces in both directions should be equal (otherwise it would stretch out/break)? If that was the case, couldn't we also say that $m_2g + f = m_1g$? Or is it because there is no relative motion of the rope wrt the pulley? The confusion I have with this is that the equations of force would be the same if somehow there was no accelerated motion of the rope at all (wrt ground), so how are we making it clear-in the equation- that we're saying net force on the rope is zero due to lack of relative motion? I'm just very confused, any help is appreciated!
EDIT: After reading this paper (RG) along with the one mentioned by @John Darby, I have found out that this is apparently a much more complex problem requiring more analysis than I am capable to calculate with my current education and understanding of mechanics. But more importantly, after all that analysis, I found out that the result comes out in such a way that $T_1 - T_2$ creates the net torque on the pulley. Even though these forces act on the string and not the pulley, on calculation the result is the same.
 A: You’re right. It’s wrong to write the tensions as if they’re acting on the pulley without any justification. What force does act on the pulley is friction between itself and the rope. There isn't a good way to draw this "force" on an extended FBD for the pulley as it's really a lot of small frictional forces adding up at the contact points between the pulley and rope. These add up to create a single, equivalent net friction force acting at any point tangent to the rim of the pulley in the direction of the rope's acceleration.
Those papers do a good job of a thorough analysis but I don’t think it’s necessary. The tension in a massless string is not always constant. It is constant whenever there are no other forces acting on the segments of the string. Consider the case where $m_2$ instead lies on a horizontal table on with sufficient friction to keep the system static. Then there may well be friction between the rope and the pulley. But the rope and hence each infinitesimal segment of it is stationary. So the net force on each segment vanishes and $dT-df=dm\cdot0$. Integrating gives $T_2-T_1=f$, and $f$ is the total friction experienced by the rope from the pulley. Of course, from Newton’s third law this will be the force experienced by the pulley from the rope.
In the general dynamic case just replace $0$ with $a$. Now you must also additionally state that the rope does not slip against the pulley (a realistic assumption in many scenarios) in order to relate $a$ and $\alpha$ through $a=r\alpha$.
Aside:
I find it hard to believe that this detail was first noticed up until recently. One explanation may be that in the past the justification above was brushed over and slowly deemphasized over time... I've seen instructors at my institution write $T_1$ and $T_2$ as if it were the natural thing to do. It is such a minor detail that does seem easy for many to just write and accept without much thought.
A: 
so a part of me is telling me that that is what's causing the differences in tension on either side, but that doesn't make much sense to me.

What part of that doesn't make sense?

Is the reason for this perhaps that the rope is inextensible, so the forces in both directions should be equal (otherwise it would stretch out/break)?

And that the rope is "light".  If there were any unequal forces, the rope would accelerate rapidly.  By the rope remaining here, we know that any forces on the rope only sum to zero.

couldn't we also say that $m_2g + f = m_1 g$?

Only if the masses aren't accelerating.  We know the downward force of gravity on them.  But if one is accelerating upward and one is accelerating downward, then the net force on them is not zero and the tension  in the rope can't be set equal to that.

so how are we making it clear-in the equation- that we're saying net force is zero due to lack of relative motion?

Yes.  The $m$ of the rope is defined to be near zero (a "light" rope).  $a = \frac Fm$.  For a light enough rope, even tiny forces cause huge accelerations.  Therefore any real imbalance would remove the rope entirely.  Instead the rope moves in such a way that the forces equalize.

I found out that the result comes out in such a way that $T_1 - T_2$ creates the net torque on the pulley. Even though these forces act on the string and not the pulley, on calculation the result is the same.

I find it best to not think of tension ($T$) as a force.  Instead that tension can be manifest as a force (of equal magnitude) at the end of the rope.
So rope 1 has tension $T_1$ which is created by a force from mass $m_1$ pointing down and a force from the pulley pointing upward.  One tension throughout the rope segment, two forces at the rope segment ends.
The system is acting as if instead of one rope, you had 2 ropes that were firmly attached to the pulley.
