Cook the whole masoor on the stovetop or in a pressure cooker or Instant Pot until tender.
Heat 1 teaspoon oil in a large saucepan. Add the cumin seeds and, when they darken, add half the onions and the cloves of garlic and saute until they turn golden-brown. Add the coriander seeds, poppy seeds, sesame seeds and the dry red chili pepper, if using. Saute until these ingredients are lightly colored and very fragrant. Then remove them to a bowl and set aside to cool.
Once the ingredients have cooled, add them to a blender along with the tomatoes. Blend into a very smooth paste. Add a bit of water if needed to keep the blades moving, although it should not be necessary.
Heat the remaining oil in the same saucepan and add the remaining onions. Add a pinch of salt and saute the onions until they are golden-brown. Stir in the ginger garlic paste and saute for a minute.
Add the blended masala and the cooked masoor to the pot along with a cup of the lentil cooking stock, if any, turmeric, paprika, if using, and the sugar. Mix well and let the lentils cook for 10-15 minutes, stirring occasionally, until you see pools of darker liquid float to the top, which tells you everything is cooked as it should be. You can add more liquid to the pot at any time for a runnier dal.
Sprinkle on the garam masala, stir well, and add more salt as needed. Turn off the heat and garnish with cilantro. Serve with wedges of lemon to squeeze on the dal and rice.