Update:
This problem can be simplified in the following way:
For an $n x n$ board where $n$ is even, make $\frac{n}{4}$ squares that are $2 x 2$.
This has $\frac{n^2}{2}$ horizontal and $\frac{n^2}{2}$ vertical moves.
Now, join any 2 adjacent shapes. When doing this, you will alter both the horizontal and vertical moves by 2.
Continue joining shapes until you have made 1 single shape taking up the entire board.
You can choose your adjustments so that for each join, you alternate between increasing and decreasing the horizontal moves.
To end up with a shape that has the same number of horizontal and vertical moves, it requires an even number of join operations, which requires an odd number of shapes.
Therefore, $\frac{n^2}{4}$ must be odd.
If $n = 8$ then $\frac{n^2}{4} = 16$. Because it is even, the number of join operations is odd, which means that you cannot end up with an identical number of horizontal and vertical moves.
So Professor Erasmus is incorrect. This cannot be done with an $8 x 8$ chessboard.
Original:
Professor Erasmus has made a mistake. He should have chosen a board with a side that is divisible by 2 but not 4.
2x2 board: Trivial to see that 4 moves must be 2 horizontal and 2 vertical.
4x4 board: Few enough paths to see that the best you can get is a difference of 4 between horizontal and vertical. Also, the worst you can get is a difference of 4.
6x6 board: Follow the outside edge for 17 moves, then zig-zag back through the center. Total of 18 horizontal, 18 vertical. This is one of many ways to achieve this.
8x8 board: Again, the best that you can do is a difference of 4 between horizontal and vertical.
I have not tried larger boards. I expect that my answer is accurate for them.