Moreover, this fact that work is defined along a path is not taken in
consideration when applying the conservation of energy. Could someone
clarify this points?
It's not quite clear what you are asking, but it seems you are asking about the difference between work done by a conservative force, which is path independent, and work done by a non conservative force, like friction, which is path dependent. So my answer is based on that assumption. If that's not correct, let me know and I'll either revise or withdraw it.
Mechanical energy, i.e., the sum of potential energy (PE) and kinetic energy (KE) at the macroscopic level, is conserved when the work is done by a conservative force, such as gravity, electrostatic, and elastic forces, because such work is independent of the path.
However, overall conservation of energy still applies to work done by non-conservative forces, such as kinetic friction, when you include the change in kinetic energy at the microscopic level, i.e., atomic and molecular kinetic energy. The negative work done by kinetic friction converts macroscopic KE (loss of KE of moving object) into microscopic KE (increase in molecular KE, i.e., increase in internal KE of the material at the rubbing surfaces).
In the case of a ball undergoing pure rolling down a slope with friction, as you are aware, static friction does no work. But it enables the ball to roll without slipping so that the work done by the component of the gravitational force acting down the block, which is a conservative force, converts gravitational PE into a combination of translational plus rotational KE.
Without friction, the ball would slide down the slope without rolling so that the GPE will be converted into translational KE only. It then sort of becomes the equivalent of a free falling ball in a reduced gravitational field of $g\sin\theta$ where $\theta$ is the angle of the slope.
Hope this helps.