You asked

Can I use the 5d mark iv with the rf 100mm macro or do I need the ef lens for that body?

The 5D Mark IV is a Canon EF DSLR, and the guide's page for it lists only EF-mount lenses. The guide has no page for the RF 100mm macro, so it can't confirm that lens works on this body. The one adapting note it does give runs the other way: every EF and EF-S lens adapts to Canon RF mirrorless bodies without losing anything. That note doesn't cover an RF lens on an EF body, so don't count on it.

If you want a 100mm macro for the 5D Mark IV, the guide's picks are EF lenses that fit it directly:

The Canon EF 100mm f/2.8L Macro IS USM is the one to choose if you shoot close subjects handheld. The IS helps steady the camera, though it won't freeze a moving subject. The Canon EF 100mm f/2.8 Macro USM gives you the same magnification without the stabilisation, at a lower cost. The Tamron SP 90mm f/2.8 Di Macro 1:1 VC USD is a 1:1 alternative with image stabilisation, so it's a good option if you want a different focal length.

The guide doesn't give prices for these lenses here, so check the catalogue pages for current figures.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.