Is it safe to restore the phone.apk from a stock Samsung ROM to CM9?
The answer is usually "No."  The framework changes introduced with manufacturers' UI overlays (Samsung's TouchWiz in the case of your Galaxy S II)  most likely make the stock apps like Phone, Contacts, Calendar, etc. incompatible with custom ROMs like CyanogenMod ROM that are based on AOSP (Android Open Source Project).