Flirtation with leader of dockers' union (9)
I believe the answer is:
'flirtation' is the definition.
(both can mean a casual relationship)
'leader of dockers' union' is the wordplay.
'leader of' suggests taking the first letters.
'union' becomes 'alliance' (alliance is a kind of union).
The initial letter of 'dockers' is 'd'.
'with' acts as a link.
(Other definitions for dalliance that I've seen before include "Toying - trifling - delay" , "time-wasting action" , "A casual romance" , "waste of time" , "Affair" .)