Yes, it can! You need a special MIDI cable wired like this:
PBC MIDI In Pin 2 -> Pin 2 (use bare shield wire)
PBC MIDI In Pin 1 -> Pin 4
PBC MIDI In Pin 3 -> Pin 5
Then, in Devices, set the MIDI Port to MIDI In for any device connected to the MIDI input
EDIT: Also turn on Bidirectional MIDI in MIDI Settings!