Referring to someone using their current title when discussing them in a past context
Solution 1:
I would use some variant of the 'the then (title at the time)', like 'the then Mr Lancelot', or 'the future (title now)', like 'the future Sir Lancelot', to imply the title is not being used at the time of the events.
Otherwise use the title in conjunction with a specific time, i.e. When Sir Lancelot was six, he ... With the or year providing the context for readers to assume the title was not yet awarded.