~わけにはいかない
Circumstances make an action unacceptable or impossible
You’ll be able to say you cannot do something because of responsibility, social expectations, or practical circumstances.

自然を守るキャンプ場ですから、ゴミを散らかすわけにはいきません。
shizen o mamoru kyanpujou desu kara, gomi o chirakasu wake ni wa ikimasen.
What do you think this sentence means?
Since this is a campsite that protects nature, we cannot afford to leave litter scattered around.
Express social or moral inability
~わけにはいかない expresses that one cannot perform an action due to social norms, duty, moral conscience, or psychological barriers ("cannot afford to...", "it wouldn't do to...").
約束したから、行かないわけにはいかない。
yakusoku shita kara, ikanai wake ni wa ikanai.
I promised, so I really have to go.
明日は試験だから、遊びに行くわけにはいかない。
ashita wa shiken da kara, asobi ni iku wake ni wa ikanai.
I have an exam tomorrow, so I can’t go out to have fun.
Attach わけにはいかない to a plain verb
Attach わけにはいかない (or わけにはいきません) to the dictionary form of a verb. To say one MUST do something, use the negative form ~ないわけにはいかない.
お世話になった先生の頼みを断るわけにはいかない。
osewa ni natta sensei no tanomi o kotowaru wake ni wa ikanai.
I cannot possibly refuse a request from a teacher who helped me so much.
~ことができない vs ~わけにはいかない
~ことができない says you are unable to do something. ~わけにはいかない says you could, but duty or the situation will not allow it.
~ことができない, cannot (unable)
今日はお酒を飲むことができない。
kyou wa osake o nomu koto ga dekinai.
I can’t drink alcohol today.
Simply unable, for example because of an allergy.
~わけにはいかない, can’t (not acceptable)
今日はお酒を飲むわけにはいかない。
kyou wa osake o nomu wake ni wa ikanai.
I can’t very well drink alcohol today.
Possible, but not acceptable, for example because I’m on duty tonight.
患者さんが待っているので、医者の私が昼休みを長く取るわけにはいかない。
kanja-san ga matte iru node, isha no watashi ga hiruyasumi o nagaku toru wake ni wa ikanai.
Patients are waiting, so as their doctor I can’t take a long lunch break.
友だちから借りた本だから、勝手に人に貸すわけにはいかない。
tomodachi kara karita hon dakara, katte ni hito ni kasu wake ni wa ikanai.
It’s a book I borrowed from a friend, so I can’t just lend it to someone else.
お客さんの個人情報なので、電話で教えるわけにはいきません。
okyakusan no kojin jouhou na node, denwa de oshieru wake ni wa ikimasen.
That is a customer’s personal information, so I can’t give it out over the phone.
7 more examples in the grammar path — free for a limited time.