Yes, you can. There's a couple of things wrong here though.
You can't define a function like this:
AddTwoNumbers[<|"x"->x,"y"->y|>]:=x+y;
Associations are atomic, so don't use them in pattern matching.
The values of x and y will be represented by #x and #y. Here is the code I would use:
addTwoNumbers[x_, y_] := x + y
form = FormFunction[{"x" -> "Number", "y" -> "Number"}, addTwoNumbers[#x, #y] &]
CloudDeploy[form, Permissions -> "Public"]