define can only be used at either the top-level, or at the beginning of a body. It cannot be used in other places where expressions can be used. Here is the relevant quote from R5RS:
Definitions are valid in some, but not all, contexts where expressions
are allowed. They are valid only at the top level of a <program> and
at the beginning of a <...