I could be wrong, but I doubt you're going to be able to roll the current mortgage into a new one. The problem is that the bank is going to require that the new loan is fully collateralized by the new house. So the only way that you can ensure that is if you can construct the house cheaply enough that the difference between the construction cost and the end market value is enough to cover the current loan AND keep the loan-to-value (LTV) low enough that the bank is secured.
So say you currently owe $40k on your mortgage, and you want to build a house that will be worth $200k. In order to avoid PMI, you're going to have to have an LTV of 80% or less, which means that you can spend no more than $160k to build the house. If you want to roll the existing loan in, now you have to build for less than $120k, and there's no way that you can build a $200k house for $120k unless you live in an area with very high land value and hire the builders directly (and even then it may not be possible). Otherwise you're going to have to make up the difference in cash.
When you tear down a house, you are essentially throwing away the value of the house - when you have a mortgage on the house, you throw away that value plus you still owe the money, which is a difficult hole to climb out of.
A better solution might be to try and sell the house as-is, perhaps to someone else who can tear down the house and rebuild with cash. If that is not a viable option (or you don't want to move) then you might consider a home equity loan to renovate parts of the house, provided that they increase the market value enough to justify the cost (e.g. modernize the kitchen, add on a room, remodel bathrooms, etc.
So it all depends on what the house is worth today as-is, how much it will cost you to rebuild, and what the value of the new house will be.