When I read it, "rubber baby-buggy bumpers" very clearly means the bumpers on the baby bugger are made of rubber.

Ancient-history teacher means a teacher of ancient history.

Now if you want to say the teacher is ancient, well, yer up a crick without a padle if you write it that way. You'll have to change your phrase around. Or use "aged"