Yeah I thought so. FYI the code you linked is the same one I embedded above. It looks like it really is just relying upon the in memory raster already having a configured transform associated with it. I did the same to get it to work like so:
GDALDatasetH memDS = GDALCreate( GDALGetDriverByName("MEM"), proc_num_str, cols, rows, 0, GDT_Byte, NULL );
// Set transform
Here are set the in memory raster dataset to use the specified transform (double ). Now I can call GDALRasterizeGeometries with NULL for pTransform and pTransformArg and it is handled appropriately.