Conversation so far:
if you reach base on an error is it an at bat
If a batter is judged to have reached base because of a fielder's mistake, it is scored as a hit on error. An error still counts as an at bat.
Where in the official scoring rules is the rule  hit on error“ stated
The official scorer makes the call based on the error rule which is covered in 10.12 in the official scoring rules.
What about other errors in the rules of the game
An error is charged if a batter’s at bat is prolonged, regardless of what happens afterwards.
Any other errors in the rules of the game
If a fielder drops a routine foul fly ball, and the batter is subsequently retired, an error is charged even though the outcome is the same.

Question: What about on wild pitches or passed balls
Self-contained rewrite: What about on wild pitches or passed balls are these considered errors in the rules of the game