Yes, you can use a razor to remove fabric pilling if you don't have a fabric shaver at home. A simple disposable razor should do the trick. However, be careful while pilling the fabric using a razor, as there are high chances that you may end up tearing the fabric if not done correctly.