'〜わけにはいかない': Inability due to Social / Moral Constraints ('Cannot afford to...')
[Verb Dictionary Form] + わけにはいかない / [Verb Nai-form] + わけにはいかない (Double negative: must do)
'〜わけにはいかない' expresses that one cannot perform an action due to moral principles, social obligations, common sense, or circumstantial pressures, even if one might want to ('cannot afford to do...', 'it would be wrong to...'). The double negative '〜ないわけにはいかない' expresses a compelling psychological necessity: 'cannot not do' → 'simply have to do / cannot avoid doing'.
⚠ Note: Distinction: '〜ことができない' refers to physical or technical capability (e.g. can't swim). '〜わけにはいかない' refers to social ethics or conscience preventing action (e.g. want to rest, but can't afford to take off because of an important meeting).
明日は大事な会議があるから、休むわけにはいかない。
There is a crucial meeting tomorrow, so I cannot afford to take the day off.
親切にしてもらったのだから、お礼を言わないわけにはいかない。
Since they were so kind to me, I simply cannot fail to thank them.