Airlines generally have a policy somewhere in the small print that says medication must be held only in hand luggage (to prevent any legal liability in case a passenger is taken ill at the same time as a bag gets lost), thus a need to retrieve it is not sufficient reason to have your hold lugage checked only to an intermediate point...
Perhaps having one bag checked all the way to DUB and one bag checked just to LHR along with an explanation about seeing friends in London as part of a brief stopover might persuade check-in staff ? Failing that, leaving a US$100 bill accidentally in one's passport at the time of check-in has been known to work wonders !