Yes, ideally, you can use a pocketknife for whittling. It is one of the simplest tools that many whittlers often use. Companies even tend to manufacture special pocketknives that are designed for whittling.  However, note that not all pocketknives are ideal for whittling. Some of them may not slice through wood at all, and even if they do, the curvature may not be something you expect.