Yes, canister data is written to the blockchain. Raw blocks cannot be retrieved I don’t think (or at least not easily).
Blocks contain all types of “replicated state”, including canister state but also system state like input and output queues. I believe stable memory is part of that system state.