As the user The Photon already pointed out in the comments, there are some ics which can do what you want. For example, this evaluation board from Texas instrument uses two ideal diodes LM66100 to connect a load to two different supply voltages. If the second supply voltage is larger than the first one, the ideal diode of the latter is disabled and the load is supplied by the former.
If for some reason, you still want to implement something similar using discrete components, you can try the following. I must say upfront what this circuit was not optimized and may have some flaws, which I might have overseen.
How it works:
The upper mosfets act as ideal diodes operating in a complement fashion. The lower long tailed pair compares both supply voltages and turns on, the one which is higher. Some positive feedback might be needed somewhere in order to add some hysteresis during the transition.