It's possible I misunderstand what you mean because I'm not sure what piping to less is supposed to accomplish here, but this is not true. The following program works just fine:
#lang rash
(require racket/port
racket/string)
(define (echo!!! message)
(define output {echo $message |> port->string |> string-trim})
(string-append output "!!!"))
(echo!!! "Hello")