Lemon or Lime Peels: Just put some lemon or lime peels into an uncovered container and leave them inside the confined area for a couple of days. The citrus smell will naturally replace the bad trash can smell.
Mint Extract: If you favor neither the smell of citrus nor vanilla, you can perhaps use mint extract instead. Pour several drops of mint extract on a couple of cotton wools. Toss the cotton wools inside the confined space and leave them for a couple of days.