Dressing for generalised linear Hamiltonian systems depending rationally on the spectral parameter and some applications