A Beverly Hills home whose inhabitants included actress Marlene Dietrich and pianist José Iturbi has sold in an off-market transaction for $23.5 million, according to Rachel Maslan and Felix Pena of Hilton & Hyland, who represented the seller.