I was watching the recent Ashes Series between Australia and English when the umpire Billy Bowden actually allowed an extra ball to be bowled in an over. Even though this was counted (I don't think any runs were scored), I would have thought that it would not be considered a legal delivery, and if a batsman actually got out should they be able to challenge this?
Yes, the 7th ball stands as a legitimate ball when an umpire miscounts, and so a batsman can be dismissed. This is covered in Law 22.5:
22.5. Umpire miscounting
(a) If the umpire miscounts the number of valid balls, the over as counted by the umpire shall stand.
(b) If, having miscounted, the umpire allows an over to continue after 6 valid balls have been bowled, he may subsequently call Over as the ball becomes dead after any delivery, even if that delivery is not a valid ball.
The batsman may not challenge after being given out, regardless of which ball it is. That is regarded as dissent. See Law 42.18. In such cases, a player should be reported.