Should I apply for company A or not? Does it mean you have to avoid
any companies that is closely related to your current employer?
To add more information: no NDA or non competitive agreement signed,
just a normal at will hire.
I would apply. In fact, in converse circumstances, I did apply, and landed the best job I ever had.
I worked for a software startup. As part of my role, I introduced some automation that was rather new to the industry at the time. The vendor I chose was also a startup. We were the customer.
Working closely with the vendor, I came to know a lot about the product, the people, and the company. In my mind, I always thought "that might be an interesting place to work".
When my company went public, it started to go downhill fast. People were laid off, departments were reorganized, things were bad.
I put in a call to the vendor and asked if they knew of any companies looking for someone in my role. We had a long interview talk and spoke openly about how this might look to my current employer. They decided to go ahead anyway.
Like you, I had no non-compete clause or NDA that would be problematic. The vendor just didn't want to risk alienating a client. Eventually, I learned that they concluded that my employer probably wouldn't be a client for much longer (they were correct in that).
In my most recent job, one person was let go and was later hired by the customer whose account he serviced. It happens.
Apply. Be sensitive to that fact that some customers don't want to "steal" employees from their vendors and they may hesitate. That said, it happens a lot.