Short answer: Yes you can! It would require a lot of work, but you can.
Long answer: If the requirement about the solution coming from a custom module is strict, then skip to the last part of this answer. Otherwise you're welcome to fully read it.
What I would do
If the requirement about custom module
is not strict, you can just create a page and add a custom template for it. Take a look at Template (theme hook) suggestions
i.e. Create a page called My custom page
and let's say the Node id is 23, so you can create a file called page--node--23.tpl.php
inside the current theme.
In that page you can modify all the html you need (even the header, footer, etc.)
Custom module
If the solution above does not work for you, you'll have to:
- Create a custom module
- Create a custom theme
In the custom module you can add a new path like this:
<?php
function mymodule_menu() {
$items['my-page-path'] = array(
'page callback' => 'mymodule_render_page',
);
return $items;
}
function mymodule_render_page() {
}
Later use the hook_custom_theme, in the module, to load your custom theme when certain criteria is met.
Something like:
<?php
function mymodule_custom_theme() {
if ($criteria_is_true) {
return 'my_custom_theme';
}
}