Wash and soak 1 cup of toor dal for 15-30 minutes. Drain excess water (or use unsoaked, but add an extra minute to cooking time if unsoaked).
In the inner pot of the Instant Pot, add the soaked (or unsoaked) dal, chopped onions, tomatoes, ginger, garlic & green chilies paste, salt, turmeric, tamarind pulp & water.
In a separate heatproof glass or steel bowl or small pot, add rinsed basmati rice and water. Cover this with either aluminum foil or steel plate. Place this bowl on the trivet inside the Instant Pot.
Close the lid, set the vent to sealing, and pressure cook on high for 8 minutes. After cooking, let the pressure release naturally for about 5 minutes, then do a quick release if needed. Whisk gently.
In a small pan, heat ghee over medium heat. Add cumin seeds and let them sizzle, then add asafoetida, dry red chilies, ginger garlic green chili paste, and cook for a minute. Add Kashmiri chili powder, sauté briefly, then pour this tadka over the cooked dal. For onion tadka, add the sliced onions to the ghee before the dry red chillies and fry them and add the remaining ingredients to the tadka.
Stir the dal well, garnish with cilantro if desired, fork the rice & serve hot with rice.