Lithion ion batteries aren't the most stable - it's not just xx batteries put together to work.. These batteries need a BMs manager, if they discharge at different rates, overheat, or pull too much draw at once they can start fire or explode (I build ebike kits out of these, they're very finicky).
What you're doing MAY be fine... But from what information I've found out online it's a bad idea and can wreck your tools.and batteries. Especially if you're charging them in the non-matched charger.
Ryobi and ridgid are made by the same company pretty much.... So you have that going for you. But even though it's a small chance, I wouldn't want to risk a fire to save a few bucks. At the very least you should tell people not to put the adapters in the chargers.... That's where the fire would likely start. Here's an excerpt from something I found online with Milwaukee tools and adapters - and again... I'm not a battery expert. I've just seen a few fires (caused by me!) from these 1850 batteries. They're great batteries, but there's a reason they're not replacing as batteries...
" If you take apart either of these batteries and tools you will notice each of them has a circuit board close to the terminals. This is for the battery and the tool to communicate back and forth so it can get the most from the battery. This protects the tool and battery from failure due to overheating or overload, (When the tool shuts off automatically until it cools down) To add to that, the circuits in the batteries communicate with the circuits in the chargers to optimize the charging time of the batteries. Tools have come a long way, but the general consumer/public knowledge of their internals have not. If you use an adapter to connect one of these batteries to a tool from a different brand the LiON batteries will discharge their maximum capacity, instead of rationing it to optimize the performance. In short, you will have the ability to supply power to the tool, but it will only be able to discharge at the battery’s maximum rate. Meaning that you will get much shorter run times, the battery could potentially overheat, and the tool could suffer failure, especially if it is not brushles"