Yes, courses can be different lengths.
It can even surprise you how different measurements of the same course can be. At a recent race I was told by four different people four different measurements that they had all just found with their various GPS devices. Also, many states don't even agree how to measure the course (measure the shortest possible path taken, measure from the mid-line of the entire course, measure the most likely path taken). For the past three seasons now Iowa has adopted the "measure along the most likely run path" theory (previously it was the mid-line). However, many races are run with only a single line for runners to follow. Most will run along that line, even though by rule they may run five feet to either side of that line. The measurement is usually taken long the line. Running alertly and wisely can shave significant seconds from one's time.
So comparing times from one meet to another can contain a great deal of variation and this does not even begin to discuss the difficulty of one course to another.