Ah, this is a common point of confusion for students taking early physics. You draw out a free body diagram with a pulley like this, and because you don't know without plugging in some numbers which way the block on the ramp will actually move (is the mass hanging from the pulley heavy enough to pull the mass on ramp up the slope? Or is the mass on the ramp heavy enough, accounting for the angle of the slope, to pull the mass on the pulley up?), you don't know which direction friction is in:
The way to think about it is, imagine the friction as a "reaction force". It reacts to the motion. If the mass hanging from the pulley was overwhelmingly heavier than the mass on the ramp, it'll obviously pull the ramp mass up and thus friction would be trying to oppose this (and vice versa). So first solve the problem, assuming there's no friction, and this will give you the direction it will move. Then, account for friction, and you may now find that it still moves in that direction, or the friction is big enough that it doesn't move at all (also, don't make the common mistake students often do: sometimes they find that the frictional force is bigger than the accelerating force and then add them up and find that friction is pushing the mass in a strange direction! But the frictional force you get from $F_{fric} = \mu F_N$ is a maximum, the most friction can do. Thus if the term above is bigger than the accelerating force, only a force of magnitude equal to the accelerating force acts in the opposite direction to it).
I think the reason this confuses so many students is that it can't be solved without plugging in numbers first: depending on the different masses and slope, it can either go one direction or the other. Students in these courses are often taught to solve the entire problem analytically and then plug in numbers at the end to get a numerical answer, but this problem involves a little bit of analytic work, then numerical, then analytic again, and then numerical.