Prior disclaimer: the below is based on my limited experience programming this stuff…
I haven’t actually read the ICC specification, but a lot of folk say it “specifies” D50 as the white point to be used in its profiles. My experience is that ICC profiles don’t have to actually use D50; indeed, if you use dcraw to develop your raw file to sRGB, the resulting TIFF will contain a D65-anchored sRGB profile. A profile of a particular whitepoint can be converted to another whitepoint with one of the chromatic adaptation transforms (CATs) @snibgo referred to. I think ICC said, “Use D50” to keep things simple. LittleCMS, the library I use to apply profiles, seems to handle the CAT just fine.
I recently started a thread on developing an overview chart describing how profile-based color management generally works. You might find it helpful: