I'm trying to install a custom Rom of android version 6.x. But I installed the google apps for version 5.x. Would they work fine if I install them together?
Yes, Google Apps for older Android versions still work with the latest version of Android (usually, with Android 6 they need a fix to give them some permissions)
Although they might work, I recommend getting OpenGApps for your Android version for better compatibility and the latest patches.
No, you should re install the ROM and the corresponding Google apps version of the ROM you're trying to run.
If you still get error messages please follow the cyanogenmod wiki about this cases, the worst thing that could happen is you need to make a factory reset from your custom recovery.