Tick lengths for each of the plot's axes are controlled by (elements of) axis.components
in lattice's graphical parameter list.
Run str(trellis.par.get("axis.components"))
to see what you are aiming for, and then do something like the following:
mytheme <- list(axis.components = list(left = list(tck=4), right = list(tck=4)))
trellis.par.set(mytheme)
densityplot(~x)