1-I did that a year ago.
Does this mean more or less 365 days ago or does it mean in the year 2005?
2-I did that three years ago.
Does this mean more or less 1195 days ago or does it mean in the year 2003?
If it doesn't mean in the year 2003, how would you say that?
"A year ago" means more or less 365 days ago. If you mean any time in the previous year, say "last year".
The further back in time you go, the less accurate things become. "Three years ago" -- speaking in April 2006 -- would probably some time in the first three or four months of 2003. "One hundred years ago" means just about any time in 1906, or possibly even some time in 1905 or 1907. "One thousand years ago" could mean almost any time between roughly 900 and 1100.
If you really mean "in the year 2003", then you need to say "in 2003". If you mean exactly three years ago, or exactly one hundred years ago, then you say "exactly .... years ago" or, to be even more precise, "...years ago today".