Yes, it is the literary device homograph in which the words have similar spellings, but different meanings and oftentimes different pronunciation. For instance, in your example, the word “rose” is a flower and verb too, both have same spellings but different meanings.