Yes, but not from anyone.
You can receive a no-claims (SF) class from another person if you are a first grade relative of that person and if you drove the vehicle regularly.
‘First grade’ relatives include spouses, life partners living in the same household, parents and children, grandparents, grandchildren, siblings, and parents-in-law, who live in the same household.
You can only take over as many years of no-claims as you possess your driving licence.
The discount you will receive may vary compared to the previous no-claims (SF) class owner as every insurer has its own no-claims (SF) classes.
The person transferring the no-claims loses the class and the related discount.