Yes, if airlines have a code-share agreement (where two or more airlines share the same flight), the same physical flight will have different flight numbers under each airline.
When booking a codeshare flight, you may see multiple flight numbers for the same flight, each corresponding to a different airline participating in the codeshare.
For example:
Airline A and Airline B have a code-share agreement for a flight from New York JFK to London LHR. When Airline A sells tickets for this flight, it might be listed as "Airline A Flight AA101", while the same flight sold by Airline B might be "Airline B Flight BB202".
Both "AA101" and "BB202" are the same flight, operated by either Airline A or Airline B, but marketed and sold by both. Passengers from both airlines will be on the same aircraft.