There are thresholds that you have to hit - 10-15% has to be protein, another 10-15% has to be fat. The other 70-80% can be any ratio that works for you.
Dietary fat and dietary protein are required - our body cannot manufacture these nutrients on its own. Carbs, on the other hand, can be synthesized by the body. There are no essential carbs, whereas there are essential proteins and fats.
The entire diet industry exists because of that 70-80%. Genetics, personal preference, allergies and intolerances, and many other factors will dictate what ratio works for you. Some people do great on keto. Others don’t. Some people do great on Mediterranean, others don’t. Find a ratio that works for you, and adjust accordingly when it doesn’t.
To answer the second part of the question - no, the ratio isn’t necessarily going to influence your body fat percentage, at least not directly. If you eat in a responsible deficit and incorporate resistance training into your routine, you will train your body to burn fat and build muscle regardless of what your macro ratio is.