In the two screenshots attached you can see:
So it seems you can't attack an enemy land unit with a land unit inside one of your cities if a ship is docked at the same city.
Also I've attached the savegame (compressed).
- If the trireme is in York, I can't attack the enemy spearman (the red dot appears so I can't move my spearman).
- If I move the trireme outside of York now I can attack the enemy spearman (it takes me two turns to reach him).
So it seems you can't attack an enemy land unit with a land unit inside one of your cities if a ship is docked at the same city.
Also I've attached the savegame (compressed).