The answer to your query is yes. But it can become a problem if there is not enough equity in the property to pay off the mortgage and then your charge (which ranks behind the mortgage). In theory you can refuse to agree a sale if this is the situation, but it may be that the debtor could get the Court to order a sale. If that happened, any part of your charge which was not paid off would become an unsecured debt.
It may be that you and the debtor could agree (if this is what you wish) that the money is not paid to you when the house is sold, but instead a charge is placed on the house the debtor is buying. Of course, this would not work if they are not buying one.