There's most likely a clause of non-assignability and a due on sale clause for transfers in the mortgage.
But the practical reality is if the mortgage payment is being made, most times the mortgage company doesn't care who the money comes from. They just want the money.
If you are bringing the mortgage current and offering extra collateral and doing this with lender's permission, they will most likely try to extract $$ from you to do so and demand you refinance the mortgage or pay some fees/ points even if they do allow you to assume the loan.
Most likely they will want the loan taken out.
If you assume without notifying them and bring payments current, most times you shouldn't have a problem but legally the bank can issue a new notice of default call the note.
Read through the mortgage/note and look for clauses to that cover this.
This is not legal advice just practical real world experience.