The scarlet ibis's death is a foreshadowing of Doodle's.
Doodle is a very special individual. He is different. He is a brilliant streak of color in an otherwise mundane universe. The scarlet ibis was a literal streak of color against the backdrop of an otherwise mundane farm existence. He brought a flash of beauty to the world, as Doodle did.
When the scarlet ibis died, so did that flash of brilliance, that moment of light on the earth. When Doodle died, the same thing happened. A light was extinguished. Even at the end of the story, the brother is cradling his "scarlet ibis." Truly, the Ibis and Doodle are one and the same.
Additionally, when the scarlet ibis died, Doodle insisted on burying it. He himself felt a connection with the bird. He felt their similarities, and maybe he even felt the foreshadowing. He was a wise kid. :O)
2nd--The brother and Doodle are very similar. Doodle decides to be go to the bird, encourage the bird, protect and eventually bury the bird. Doodle was the Ibis's chief mourner and perhaps an accidental contributor to the stresses that cause the bird's death. If nothing else, Doodle is a witness to the bird's flight from this world. Such is the case for Doodle's brother. Consider, the narrator encourages Doodle and contributes to Doodle's quality of life. Sure he is a contributing stress to Doodle's final exhaustion, but the narrator dod not knowingly kill his brother. The narrator was a witness to the death of the "special" tragedy of Doodle's death.
Consider the parallel images--red--the neck--the legs--the rain--the tears--the lone witness-- The Ibis and Doodle are obviously linked....
The author intentionally uses the appearance of the ibis to foreshadow Doodle's death and to represent the very essence of Doodle. If you carefully examine the story from the appearance of the bird in the tree to Doodle's death, you can create a parallel between Doodle and the ibis and Doodle and the brother. How so?
1st--Doodle has remained too long with the family and in this world. Repeatedly throughout the story, characters such as the doctor and Doodle's mother have pointed to Doodle's "special condition" and the fact the child has survived beyond his years. Aunt Nicey even comments on Doodle's being "specially blessed" or out of place--the caul was an omen. Just as the Ibis is too far inland--has come to far ashore--blown in by the storm--Doodle has been too active and become too much of this world. His condition--his heart cannot keep up--will not keep up. He will return home--just as the bird will soar from the pain and confusion of the storm.