Ruth could not have been a moabite. God cannot do "what he wants" if it breaks his own ordinances and commandments. That would make him a liar and hypocrite.
When he said "no Moabite or ammonite for ever" he meant anyone. Period. He didn't give any stipulations otherwise. If Ruth was a moabite by blood then he broke his own command.
🤷