Most of the time, a home located next to an apartment complex would attract more renters than buyers.
So yes, you could certainly look into renting out the property.
However, the price you could demand depends on many factors including the quality of the complex, quality of the home, the location, and the market for your area.
I would be happy to help you find a market price for your rental home and help you with the leasing process! You can reach me any time at email@example.com.