If your wanting to build a 24v using a 12v block, yes you can, 12v blocks have different threads for sensors so a adaptor is needed.
If you wanting to just swap a 24v head onto a 12v engine it's best to use 24v pistons, you may need to swap in a 24v cam but I not sure, if you can keep the 12v...