Can I say "Just a year before" instead of " Just one year earlier"?
Yes, you can replace "just one year earlier" with "just a year before". Both of these phrases express the same meaning of something happening one year before the time that is being discussed. Ex: Just a year before they moved into the house, the house was abandoned. Ex: They are celebrating their wedding anniversary today. Just a few years earlier, they didn't even know each other.