For a fully refundable Y-type fare, you can get a refund even if you do not cancel the reservation before departure -
From the fare rules -
AFTER DEPARTURE
CANCELLATIONS PERMITTED.
But it would be easier to cancel before departure if possible. Just don't check in for your flight so that the eticket file remains OPEN. If you wait until after departure or if you checkin, you may have to call UA res to get the refund processed.