The answer to this question depends entirely on how you let characters level. Since it is undefined (in terms of how long, when it starts, what it requires, etc.), you can't say that the rules disallow it, but nor can you say the rules allow it. For example, one person defines levelling up as an instantaneous event that occurs when the character decides. The character could, for example, read an 8th-level scroll of divine power, gain a +8 BAB, and then level up to 3rd level and take improved critical as his 3rd level feat because he suddenly qualifies for it. Now, granted, he can't use the feat unless he has the prerequisite again so this example has limited application. But arguments can then be made for other feats using such feats as prerequisites or for PrC entries.
In my view of levelling up, it's not allowed. Temporary boosts to abilities are not sufficient for prerequisites for feats or requirements for PrCs.