Yes this is absolutely no problem, it will trigger a message from the Synology software if you want to use a disc that has not been found to be good for NAS in the Synology database, but you can skip the warning and it will only be shown once.
Also you can use different disk sizes in a Synology system, for this the Synology Hybrid Raid (SHR) concept is used, it is technically equivalent to a RAID5 with the advantage that you can use different disk sizes in the SHR configuration.
There is even a RAID calculator from Synology where you can calculate the usable space with different hard disk sizes.
https://www.synology.com/de-de...