The attendant was wrong to say that the dog had to be placed in the overhead locker, however, the owner is responsible too. I am sure most pet owners would leave the flight rather than place the dog in the overhead locker.
Even if you did allow the dog to be placed in the locker, why on earth would you not be checking on the dog during the flight and opening the door as much as possible?
I just cannot fathom how someone would agree to put their pet in the locker and then not check on them/open the door for air regularly.