Firstly: One who Dies not having Performed their Wajib Hajj
Hajj remains a duty upon one who dies not having performed his wajib Hajj. It is funded through his capital whether he indicated as much in his will or not.  It is not a duty to perform Hajj on behalf of one who dies without leaving an estate. However, it is mustahabb that an heir perform Hajj on his behalf. This is the position of the Shafi`i, Hanbali, and Zahiri schools. It is the position of a group of the Salaf. This is the chosen position of al-Shinqiti and Ibn Baz.
Secondly: Performing an Optional Hajj on Behalf of the Deceased
It is permissible to perform an optional Hajj on behalf of a deceased person whether one is an heir or unrelated, and regardless of whether or not the heirs permit it. This is the position of the Shafi`i and Hanbali schools. This is the chosen position of Ibn Baz.