In a large pot, place the beans and the 3 onion halves and add water to cover by 4 inches.
Bring to a boil, reduce the heat to low and simmer for 40 minutes.
Add the sliced onion, celery, carrot and salt and simmer for 20 to 40 minutes more, adding a little more water if needed, until tender.
Add the lemon juice and black pepper to taste and simmer for 10 minutes more, or until the beans are just covered with broth.
Transfer 1 cup of the soup to a blender (avoiding the onion half) and puree.
Return the puree to the pot and cook for 2 minutes more.
Remove from the heat and discard the onion halves.
Stir in the oil and sprinkle with the Aleppo pepper or pepper flakes, if desired.
Taste and adjust the seasonings, sprinkle with the parsley, if you like, and serve hot.