Hello Krishna,
You can leverage addBody function from the Robotics Systems Toolbox to attach the holder at the end of the 'tool0' frame of UR rigid body tree model. In adiition to this, you can utilize setFixedTransform function to define the offset between the newly added holder's referance frame and 'tool0' referance frame. Once you have the correct offset, you can use the tools for analytical Inverse Kinematic with the modified rigid body tree models.
For the similar implementation, refer to Add a Dummy Glue Dispenser Tool at the End-Effector Body section of the Simulate a Universal Robots UR5 Using MATLAB and Gazebo for Glue Dispensing on a Windshield example. In this, an external tool is attached to the UR robot and a new referance frame is created at the tip of the tool. Further, various trajectory generation tools are used to compute trajectories for the new TCP.