Hello,
That error doesn't seem from phpdocx but from the code you are running. As you can check in the error you get:
Call to a member function addImage() on null
This line means that when calling:
$rooms_image->addImage($image_options);
$rooms_image is null, not a CreateDocx/CreateDocxFromTemplate object, so you get an error because you can't call addImage from null. We recommend you to check how you are creating the $rooms_image object.
Regards.