Patients waiting on trolleys for more than 12 hours at a York hospital trust is “absolutely appalling”, a health chief said.