Yes, you can!
If an H-1B alien returns to the U.S. on AP, then the alien is in the AP status, usually for less than a year. If the alien fails to extend the H-1B status by the end of AP authorized period, alien may fall back to AOS status, hence losing the non-immigrant status. As long as the alien applies for H-1B extension prior to the expiration of AP, the alien can still maintain the H-1B status following the expiration of AP. However, some immigration specialists believe the alien does not have to apply for H-1B extension, to which I personally don't agree.