Absolutely. Everyone has the moral right to defend the innocent from evil. Bob Ewell attacks Jem with murderous intent--Jem testifies to the sheriff,
"Mr. Ewell was tryin' to squeeze me to death"--
then, he attempts to do harm to Jem's little sister. Ewell is the immoral character in the final scenes, not Boo Radley; for, he is the perpetrator of a crime with a deadly weapon, a knife. Besides all this, Ewell even attacks Boo himself because Sheriff Tate remarks upon Boo's sleeves that are
"perforated with little hole. There were one or two little pucture marks on his arms to match the holes [in Scout's costume]....Bob Ewell meant business....Low-down skunk with enough liquor in him to make him brave enough to kill children."
According to Sheriff Tate, Boo was perfectly within his moral rights since he merely pulled Bob Ewell away from the imminent danger of the children. When Ewell freed himself from Boo's grasp, Ewell stumbled and fell upon his knife, according to the the deductions of Mr Tate.