Solution:
The minimum number is 15 questions.
First, we show that 14 or fewer questions is not enough to guarantee success. Suppose Victor asks at most 14 questions, and William responds with "no" to each question unless m=1. Note that these responses are consistent with the secret number being 1. But since there are 15 primes less than 50, some prime p was never chosen as m. That means the responses are also consistent with the secret number being p. Therefore, Victor cannot determine the number for sure because 1 and p are both possible options.
Now we show that Victor can always determine the number with 15 questions. Let N be William's secret number. First, Victor asks 4 questions, with m=2,3,5,7. We then case on William's responses.
Case 1. William answers "no" to all four questions.
N can only be divisible by primes that are 11 or larger. This means N cannot have multiple prime factors (otherwise N≥112>50), so either N=1 or N is one of the 11 remaining primes less than 50. Victor can then ask 11 questions with m=11,13,17,…,47, one for each of the remaining primes, to determine the value of N.
Case 2. William answers "yes" to m=2, and "no" to m=3,5,7.
There are only 11 possible values of N that match these answers (2,4,8,16,22,26,32,34,38,44, and 46). Victor can use his remaining 11 questions on each of these possibilities.
Case 3. William answers "yes" to m=3, and "no" to m=2,5,7.
There are 5 possible values of N (3,9,27,33, and 39). Similar to Case 2, Victor can ask about these 5 numbers to determine the value of N.
Case 4. William answers "yes" to multiple questions, or one "yes" to m=5 or m=7.
Let k be the product of all m's that received a "yes" response. Since N is divisible by each of these m's, N must be divisible by k. Since k≥5, there are at most 10 multiples of k between 1 and 50. Victor can ask about each of these multiples of k with his remaining questions.