Safety Certification in the Latent space using Control Barrier Functions and World Models