Quantum mechanics of composite objects with internal entanglement