Would that be ok to connect one device in a star topology. Do I need to put a 120 Ohm resistor to the end of this device?
If you're talking star topology, you must be talking multidrop RS-485.
Multidrop over RS-485 is supposed to have very short "stub" wiring at a node junction where the 485 signal comes in, Tees to the device, and then goes out again to the next device down the line.
The stub Tee develops reflected energy which becomes noise which can not be distinguished from valid signal data transitions, resulting in errors and loss of communications.
However, Profibus DP uses RS-485 and publishes a chart on total spur length segments.
The caveat is the use of specific cable and Profibus is biased at the master. So my opinion is to try it and see. At lower baud rates, you might get away with it.
In any case, do not put a terminating resistor anywhere except at the ends of the multidrop transmission lines. Adding a resistor at a node in the middle of a multidrop at the end of stub will pull the signal down. That's a definite no-no.
An accepted technique of dealing with outlying devices is to use an isolating repeater to provide data to the outlyer nodes as shown on this topology graphic:
So, try a long stub and see if it works at your baud rate, but leave off the terminating resistor.