If you statically assign Computer A the address 192.168.2.1 and Router A 192.168.2.254 (subnet masks of 255.255.255.0), Computer A can find the router by using ARP.
For example: Ping 192.168.2.254
Computer A immediately realizes that this address is local (within 192.168.2.xxx). This will cause Computer A to do an ARP broadcast (Who is 192.168.2.254? Tell 192.168.2.1). Router A will respond "192.168.2.254 is at MAC address xx-xx-xx-xx-xx-xx". Computer A now sends an ICMP packet addressed to MAC address xx-xx-xx-xx-xx-xx and the ping succeeds.
However, if you statically give Router A the address 192.168.10.254 (subnet 255.255.255.0) you will have a problem. When you try to PING 192.168.10.254, Computer A recognizes that this address is not local (not within 192.168.2.xxx). If no default gateway is set up then Computer A will give you an error because you have not told it where to send packets that are outside the 192.168.2.xxx range.
In order for Computer A and Router A to talk to each other, you would need to manually insert Router A's MAC address to each packet (through some software) or make a static entry in the ARP cache that tells the computer that 192.168.10.254 is MAC xx-xx-xx-xx-xx-xx.
Now, you may wonder why couldn't Computer A do a "super-broadcast" that basically says "Is anybody out there? If so, tell me your MAC address". I believe there is a protocol that does this (called HELLO). However, even if the router did respond, Computer A would need some software that would record the MAC address and statically add it to the ARP cache.
When Computer A makes ANY packet it ALWAYS consults the ARP cache for the MAC address. If the entry is there, great! The packet is made. If there is no entry saying that 192.168.10.254 is at MAC xx-xx-xx-xx-xx-xx then Computer A cannot make a packet. Computer A cannot do an ARP request to 192.168.10.254 because it is not in the 192.168.2.xxx range.
You could get around this by using the subnet mask of 255.255.0.0 which would put both addresses within the "local" range. Computer A can do an ARP request and Router A will respond.
So, in answer to your question, Computer A MUST be assigned a default gateway (address of Router A) either statically or through DHCP in order to have any chance of talking to Computer B.