It would be possible to use a multisignature scheme in order to will the bitcoins.
A 2 out of 3 multisignature address would be shared among three keys controlled by the bequeather X, the heir Y, and a trusted third party Z, for example the notary of X.
Any two parties of the three could move the money:
- Bequeather X could change his will with the help of Notary Z.
- After demise of X, Heir Y can access the funds with support from Notary Z.
- Bequeather X and Heir Y could access it in advance for other reasons.
As Nick has pointed out, this would have to be done before the demise of the Bequeather, otherwise access would fall to whoever ended up in control of the private key, or the bitcoins would be lost if no-one regained it.