Wonderful question. You are absolutely correct, we cannot define a force field for friction like we do for gravity. But the formula for work
$$W=\int_\gamma \vec{F}\cdot\vec{dr}$$
still holds. We just need to be a bit more careful about how we write $\vec{F}$. Naturally (like for gravity), we want to write down $\vec{F}$ solely as a function of position. That is, $$\vec{F}=F_x(x,y,z)\,\hat{i}+F_y(x,y,z)\,\hat{j}+F_z(x,y,z)\,\hat{k}.$$
For example, gravity has a constant force field, $\vec{F} = -g\,\hat{k}$. Then, to solve a problem, we would parametrize a curve $\gamma = (x(t),y(t),z(t))$, replace all the x's, y's, and z's in the equation for $\vec{F}$ with these new expressions (in terms of $t$) and then do the line integral.
But we didn't have to write $\vec{F}$ solely in terms of $x$, $y$, and $z$. In fact, the form I wrote above may not particularly useful - we didn't even use it directly! We only used it as a tool to get $\vec{F}$ at each point along the curve, and by extension to get $\vec{F}$ at each time $t$. But if we already know either of these things, then we don't have to go through those gymnastics.
For example, how does the story for kinetic friction go? Well, it always oppose the motion, or is in the direction opposite the velocity. Furthermore, it has a constant size dependent on the mass of the object ($F_{f} = \mu_k N$). So, we know $\vec{F}$!
$$\vec{F} = - F_f \,\vec{\gamma'(t)}$$
Here I wrote the vector sign for emphasis. From here hopefully you can see that, given a curve, we can find the work due to friction. Let me know if you're still having trouble with the details.