There's definitely not a universal definition out there.
The City of Toronto defines affordable housing as housing that is below 100% of average market rent. The city's funding programs target rents to be set at 80% of average market rent or less when they are providing capital funding or other significant incentives. Of course, in the city of Toronto 80% of average market rent is not affordable to most residents.
When non-profits put together projects for folks who have lower incomes, we will often layer in rental housing supplements or other forms of rental supplement, like an RGI supplement, to ensure that the tenant's portion of the rent is affordable and that the subsidy is meeting that difference. All projects that target lower-income people or folks on fixed income—like ODSP, Ontario Works or OAS—require those types of layered rent supplements in addition to the other supplements.
In addition, in the U.S. a common strategy is to have mixed buildings owned by non-profits, in which rents for some units are above market to subsidize the lower-rent units for folks who need lower rents. That's a model that is more common in the U.S., but we should be increasing the use of that here in Canada.