Here, as if could be replaced with like or as though. It conveys similarity, but at a distance; just how similar the two things are is vague, unclear, or not yet established. As if cannot be omitted or replaced with that, because it's required to connect the two clauses and express the particular meaning of uncertain similarity.
B is saying that the ceiling might collapse at some unknown future time. Tone of voice will and context can provide more information to narrow the scope of the statement; in this case, the implication is that B believes if the ceiling were to collapse, it would happen fairly soon.
Another question, can we use will instead of going to... in B?
Yes. Doing so would change the meaning, though. Both will and going to are completely routine, correct, and commonplace ways of predicting future action. Will is more definite than going to, however. It's also more flexible a word in general, so those many different uses are probably what makes it seem a more common choice than going to.
Making this change, B's statement becomes more definite: the ceiling is definitely going to fall, and only the timing remains uncertain. The implication of soon remains, so it would be a noticeably stronger warning against entering the room.