The batter reaches first base on a hit.
The batter does not REACH on the error, BUT the fielder is credited with an error during the at-bat under Rule 10.12(a)(1). The error prolonged the time at bat for the batter. This ruling is reinforced by 10.12(a)(2), specifically referring to a misplay on a foul fly, whether the batter safely reaches first base or not.
ANY time a fielder misses a play that he should have made given ordinary effort, it is an error.
So, if I was keeping score, what I'd do is score the hit in the boxscore, and add a little asterisk in an empty corner of the box. On an empty part of the page, I'd note that the asterisk represented an error on the fielder, prolonging the batter's time at bat.
That batter becomes an unearned run, but if there are less than two out at the time, subsequent batters can become earned runs. Reconstruct the inning as if the batter was put out by the fielder catching the foul fly. (Rule 10.16)