In a medium saucepan, warm the olive oil over medium heat until shimmering. Add the onions and sauté until just soft, about 5 minutes. Add the garlic and cook until fragrant, 2 to 3 minutes. Add the ras el hanout and stir to combine. Add the carrots and stock and bring to a simmer. Cook, partially covered, until carrots are metingly tender, about 30 minutes.
Working in batches, transfer the soup to a blender and puree, then return it to pot (or puree it directly in the pot using an immersion blender). Stir in the coconut milk and lemon juice and simmer for a few minutes to combine. Thin the soup with water if necessary (the soup should easily pour from a spoon).
Ladle the soup into four bowls, top evenly with the dukkah and parsley, and serve.