I have taken spin classes where they did incorporate some free weight exercises while still on the bike. I didn’t think it was unsafe, just uncomfortable. In my opinion it’s not wise to use heavy weights (dumbbells or weighted bars)while still on the bike. I’m not sure there are any studies that have been done on this subject (or at least I’m not aware of any). You just need to use common sense if you are going to use any type of free weights while still on the bike since not everyone is build the same and most likely they will have many imbalances. Also it’s difficult to maintain correct form while spinning at the same time.