It's a hyraulic pump. There are two hydraulic pumps on the YM240 - one low pressure type for the engine oil and one much higher pressure and flow rate for the 3pt operation. Checking the oil that is leaking will tell you which one you are dealing with. Engne oil is typically black with soot. Trans/Hydraulic oil is clear to milky. BTW, milky = water in the trans/hydraulic system.
Either way, I wouldn't just jump up and try to cure a leak unless it is leaking enough to lower the oil level. Here's why:
Hydraulic pumps generally don't have gaskets. They are made to an extremely close tolerance with polished surfaces and sealed with O-rings.
The type of O ring is critical, and you want an original Yanmar rather than a USA replacement O ring. We can talk more about the difference in O rings if there is any interest.
But before doing anything, you should check which pump it is and if the oil level is low.
Here's some YM240 info: