Some monkeys have a bone in their penis. Humans do not, as far as I know; haven't checked them all. So yes, a skeleton can get a boner, but only if it is a non-human skeleton.
The air must go somewhere. You ever see those videos of people putting a spaghetti noodle in their nostril and then pulling it out their eye socket?