Purpose of 要's location in 今天晚上老板要和我们一起加班。
When 要 is used to mean &quot;do something&quot;, it usually means &quot;will do sth&quot; or &quot;want to do sth&quot;, and also sometimes &quot;need to do sth&quot;.
In your original sentence, 要 can mean both &quot;will&quot; or &quot;want to&quot; depending on the context. See the following examples.

今天事情比较多，所以今天晚上老板要和我们一起加班 (There is too much to do today, hence the boss will join us in working overtime tonight).
老板想知道我们加班时到底有没有认真干活，所以今天晚上老板要和我们一起加班 (The boss wants to know whether we are taking the overtime seriously and wants to join us tonight).

As for the position, I am not sure whether there is an explanation involving grammar. The second one does not sound natural while the first one does.
I can come up with an example where 要 is placed right before the verb, only with slight modification to your sentence:

今天晚上老板和我们一样要加班 (The boss has to work overtime tonight just like us).