What happens if when a Pokemon levels up after a stroll and wants to learn a move, does he learn it or not?
The Pokemon would not learn the move. In this case, take it to the move relearner.
Source: Experience.