To add to what wila already said,
To install a ESXi 6.5 on MacBook Pro directly you would likely need to wipe out the macOS as a result to have the ESXi datastore. You should be able to install ESXi 6.5 on an SD card or USB thumb drive and boot up ESXi 6.5 from either media by holding down the Option key during power-up, however ESXi requires a wired Ethernet which 2013 and later MacBook Pro model no longer has. The Thunderbolt 2 Ethernet works with ESXi 6.5 (I have tried it with a 2014 MacBook Pro and it works). I have no idea whether it works with the 2016 and later MacBook Pro which are Thunderbolt 3 only and would have to go a bunch of adapters (be it for the Thunderbolt 2 Ethernet or an SD card reader).
You would also need another machine be it running macOS, Windows, Linux to access the ESXi running on the MacBook Pro bare metal. Running ESXi as VM under Fusion does not require another physical machine to do so.
For running ESXi as a VM under Fusion, it is better to have a 15" MacBook Pro i7 (these are 4 core/8 thread CPUs) and from a model that is from "Late 2013" onwards. The "Early 2013" still uses Ivy Bridge CPUs. "Late 2013" models and onwards uses Haswell/Crystal Well or newer CPUs which have features that make nested VMs run better although it is unlikely to be noticeable for education purposes with ESXi (i.e. learning the ESXi CLI, getting familiar with creating/managing VMs under ESXi).