Become the table's Rules Person.
In the past few years, I've mostly played with friends that don't have a lot of tabletop RPG experience. Once ones of my campaigns finishes, I hand the reins to whoever in the group most wants to run the game next. Generally speaking, I know the rules of whatever system we're using better than anyone else at the table, just by dint of having played a lot more than they have. Because of this, I've become the designated Rules Person whenever I'm not GMing.
What this means is that my table trusts that I both know the rules well, and that I'm not going to try to overrule the GM, or be the sort of problem rules lawyer that always has to be right. In order to be a good Rules Person without being a rules lawyer, there are a few things you should do.
1. Actually know the rules well.
I'm not just talking about the combat rules, or how the classes work. Even if you're not the kind to memorize everything, read through the DMG and any other supplemental rules material you can find. If you don't know a particular rule, you should at least know where to find it, and being able to occasionally spout off how overland travel works or how to check against disease will make your group trust your rules knowledge more.
2. Talk to your GM first.
Talk to your GM about your concerns. It's difficult to have this sort of conversation, since you're basically telling a friend of yours that they are wrong, and that you know better. Be sure to stay away from an adversarial tone; this is their game and their rulings after all, you're just offering to help them with rules that they might not know.
When talking to your GM about this, offer to be a rules reference for them. If they're in the middle of a session and don't know a rule, or don't feel confident in a ruling, that you can tell them what the books say about that situation, so they can make a more informed ruling. That's an important part; you're not telling them what to do, you're giving them information so they can make a decision.
3. Follow through.
If your GM is interesting in having you fill the role of Rules Person, then take it seriously. Your GM and table have given you a trust, and you should take that in good faith. Make sure you always know as much about the rules of the game as you can, so that you're prepared for any situation that comes up. You'll probably end up helping your fellow players as well, doing things like helping them build their characters or understand rules edge cases of their abilities. You're basically a rules-specific assistant GM, and it's important that you act with everyone's fun in mind in this role.
This kind of play isn't for everyone. Not everyone finds it fun to know the rules this thoroughly, but it's very rewarding if you're willing to keep up with it.
4. Don't force it.
Your GM might not want to have someone giving them rules advice during the game. They might want to play the kind of rules-loose game that they've been running so far, and they might find the idea of needing to follow a specific ruleset like that stifling. If your GM doesn't want a Rules Person, and the rest of your party is having fun playing a rules-loose game, then you need to drop it. Some people don't like running their games according to the rules in the book, and if that describes your GM, then you don't want to try to force them to see things your way. If they really don't want your help, then try to enjoy the game anyway, or leave it. It's perfectly acceptable to say "I don't enjoy playing games that don't follow the rules, and I'm not having fun." You don't have to play a game that you don't enjoy playing.