They absolutely will be able to cancel it immediately and attack. It’s a dirty trick. It’s worse if you offer it though. That would allow them to accept, take a screenshot of your troops, change their status with you (so you can’t see their troops), and attack. It could all happen in the blink of any eye.
Sometimes it’s tough to tell who to trust.