Put the rice in a medium bowl with enough cold water to cover by at least 1 inch. Set aside to soak at room temperature for at least 30 minutes and up to 2 hours.
While the rice is soaking, put the lentils in a bowl of cold water. Swish the lentils with your fingers, then pour the water off; repeat 2 more times to wash it well. Transfer the lentils to a 3-quart saucepan, add 1 quart of water, and bring to a boil over high heat. Skim off any foam, and then lower the heat to maintain a simmer. Add the bay leaves, cinnamon, and half of the turmeric and cook, uncovered, stirring occasionally, until the lentils are tender and the mixture is thick yet soupy, 25 to 35 minutes. If it seems dry, add a little hot water. Remove the bay leaves and cinnamon, and stir in 1 tsp. salt. Remove from the heat; set aside.
Bring 8 cups of water to a boil in a 4- to 5-quart Dutch oven (or other wide, heavy-duty pot). Stir in 2 tsp. salt and return to a boil. Drain the rice and sprinkle it into the pot. Return to a boil and cook until al dente, about 17 minutes. Drain, return the rice to the pot, and over low heat, stir in the butter. When melted, cover and cook until the rice is tender, about 30 minutes. Remove from the heat and let sit, covered, for about 15 minutes.
While the rice is cooking, in a medium bowl, stir together the cucumber, mint, minced shallot, lime juice, and 1/4 tsp. salt. Season to taste; set aside.
In a 14-inch wok or wide, heavy-duty 6-quart pot, heat the oil over medium-high heat. Add the remaining turmeric and the panch phoran and cook, stirring, until the mustard seeds in it have popped, about 30 seconds. Add the chopped shallots and cook, stirring occasionally, until tender and browned at the edges, 2 to 3 minutes. Add the garlic, chile, and ginger and cook, stirring, for 1 minute.
Stir in the rice, breaking up any lumps so that the grains are coated in the flavored oil. Using a silicone spatula, gently fold the lentils, half of the cilantro, and 1 tsp. salt into the rice mixture until well blended. Gently stir until the mixture is heated through and any liquid from the lentils has been absorbed by the rice, 1 to 2 minutes. Season to taste with salt, if necessary. Transfer to a large serving platter or a wide shallow bowl. Garnish with the remaining cilantro and serve with the cucumber salad.