You can transfer from AY to QR via BA.
Each program can book flights on the other airlines, but there can be some things to look out for.
E.g. you can transfer the miles to BAEC, pool them and then from the main account in BAEC book an awardflight on AY. BA and AY has aligned the award table, so the cost in avios will be the same regardless if booking from BAEC or AY+. But availability can be different. And taxes can be different.