Yeah, this is true. A lot of things influences what/who we think we are. In the formative years, external influences from adult figures are more influential but this persist into adulthood. At this stage, perception of people around us also reinforces our idea of who we think we are. But I think, once we recognize this pattern, it is easier to disconnect and rebuild the sense of self.
Sometimes, the influences are subtle and almost psychic, thats why one of the best way to rebuild the self is to disconnect totally by relocating to a place where you're unknown. Here no one has any preconceived notion about you or you capabilities or how you should act and it's easier to rebuild the self this way.