Answer
Yes for gravity, no for friction.
Work Step by Step
This is explained on pages 217-218.
A potential energy function can be associated with a conservative force such as gravity. If an object moves around and returns to its original position, the net work done by gravity is zero.
A potential energy function cannot be associated with a nonconservative force such as friction. If an object moves around and returns to its original position, e.g., a box is pushed along the floor in a circular path, the net work done by friction is negative. If we defined a “potential energy of friction” it would have to have the same value at the beginning and at the end, but here, mechanical energy is irrevocably lost.