If we Are moving an object on an inclined surface than shouldn't friction be in the same direction?
Same direction as what? The motion of the object?
Friction is always in the opposite direction to the direction of movement of an object.
It opposes the RELATIVE motion the object has to say, the underlying surface.
Friction seeks to equalize the motions of the object and the surface.
Suppose you drop a brick (no horizontal velocity) onto a moving plank.
The friction from the plank will accelerate the brick in the direction of its own generated horizontal motion, until the brick moves with the same speed as the plank.
So friction will oppose the motion
It opposes relative motion between the object and the surface.
Separate names with a comma.