It is unnecessary to skim the foam as they do not affect the cooking process or the taste of lentils. However, if you find that it is making it hard to see the cooking lentils or causing the water to boil over, you will need to remove it.  You can easily remove the foam by using a metal spoon to skim the surface of the water gently.