であって is the te-form of である, something often called a literary copula. 宝であって宝でなくなる (or 宝であり宝ではなくなる) means "While (still) being a treasure, it will no longer be a treasure". He's saying that, without this part, the puzzle-like thing will no longer work as a treasure although it may still look like a treasure. In other words, apparently a treasure but essentially not a treasure.
EDIT: AであってAで(は)ない
is a pattern that means "technically A, but lacks an essential quality expected on A" or "technically A, but fundamentally different from what people typically think of A". For example, あの人は親であって親ではない may imply this person is legally a parent but does nothing a parent is expected to do. 私であって私ではない感覚 is a typical description of depersonalization.