Pickle your onion, if using.
In a large pot, warm 2 tablespoons of oil over medium-high heat. Add the onion and coconut sugar and cook for 5 minutes, stirring occasionally, or until they are softened and caramelized.
Add the remaining 1 tablespoon of oil, coriander, allspice, cinnamon, cumin, turmeric and black pepper. Stir to coat the onions and toast the spices, about 10 seconds. Stir in the water, brown rice, lentils and salt. Increase the heat to high and bring to a boil, then reduce heat to low and simmer, covered, for 40 minutes, stirring halfway.
Taste the rice and lentils to make sure they are cooked. If there is still water left in the pot, remove the lid and turn to heat up to boil it off. You want a bit of liquid, but not a pool. Taste and add more salt, if needed.
Meanwhile, make the yogurt sauce by mixing together all of the ingredients in a small bowl (leave out the garlic if making ahead). Taste and add more salt or lemon if needed.
Serve the lentils generously slathered in the yogurt sauce and top with cilantro and pickled red onions (if using).