You will need 2 tickets if your purchase the ticket online as online tickets do not allow break of journey.
If you purchase a normal single or return from in person at the booking office/ticket machine you may break your journey en route provided you complete the journey same day, or next day if the train you leave at Castlebar is the last train of the day.
Cash fares
http://www.railusers.ie/passenger_in...&stage1=Submit
http://www.railusers.ie/passenger_in...&stage1=Submit
Rules
http://www.railusers.ie/passenger_in...eak_of_journey