Heat oil or ghee in a wide pan over medium heat until shimmering.
Add mustard seeds and wait until they pop; reduce heat to avoid burning.
Stir in urad dal or chana dal and fry until golden brown.
Add peanuts and cashews and toast until lightly browned and fragrant.
Toss in sliced green chilies and curry leaves; sauté for a few seconds.
Sprinkle turmeric and asafoetida, stirring to release color and aroma.
Remove the pan from heat briefly and add lemon juice, salt and sugar (if using); mix well.
Add cooled cooked rice, breaking any clumps with a spatula; fold gently to coat rice evenly.
Taste and adjust salt or lemon juice as needed; keep rice fluffy by stirring minimally.
Garnish with chopped cilantro and extra roasted nuts before serving.