Absent a very specific learning objective, if (B) is correct, this is a poor question. In a high-school or undergraduate introductory biology course, I would say:
(A) The bacteria cell walls prevented their explosion
Would be the correct answer, because of exactly your reasoning. This is what you're taught in introductory biology. You're taught that animal cells don't have cell walls. Bacteria and plant cells do have cell walls.
See The Cell
animal cells are not surrounded by cell walls
Under this concept of a cell wall, red blood cells certainly don't have them.
However, red cell osmotic fragility testing comes out of a tradition that uses the phrase cell wall strength to describe the response of a red cell to osmotic stress. See Orcutt
It appeared logical to us that a model based on a distribution of cellular wall strengths ought to reproduce the experimentally observed variation of degree of hemolysis as a function of osmotic stress.
All the same, if you were operating from that perspective, how would you distinguish between (A) and (B)? Here, we're not even taking into account the fact the primary mechanism for responding to osmotic stress in most animal cells, including the human erythrocyte, is regulation of ion flow, not the pressure of a rigid extracellular matrix. If the solution contained ouabain, which certainly does lyse human RBCs, would it be best to characterize the problem as "The blood cell walls didn't prevent their explosion"?
I would ask your lecturer to clarify the learning objective behind the question. As an interpersonal note, I'd point out that this is very different from asking him or her to justify the correct answer. Some (many...) teachers are oddly sensitive to any suggestion that they need to justify their expertise, especially when it comes to exam questions. If you make it a question about the learning objective, this should help you avoid triggering that particular sensitivity.