Families are mistakenly taking out an expensive form of debt in order to avoid inheritance tax, an expert has warned.